diff --git a/mcrouter/TargetHooks.h b/mcrouter/TargetHooks.h index 310d573f3..cab1e209a 100644 --- a/mcrouter/TargetHooks.h +++ b/mcrouter/TargetHooks.h @@ -15,6 +15,13 @@ namespace facebook { namespace memcache { namespace mcrouter { +/** + * If linked, initializes and reports utilization to RIM. + */ +FOLLY_ATTR_WEAK bool gRIMReport( + const std::vector& tenancyHierarchyPath, + const std::unordered_map& resourceUsageMap); + /** * SR factory init hook */ diff --git a/mcrouter/stat_list.h b/mcrouter/stat_list.h index 7282ac886..64fc23c96 100644 --- a/mcrouter/stat_list.h +++ b/mcrouter/stat_list.h @@ -414,3 +414,7 @@ EXTERNAL_STAT(prefix_acl_concurrent_refresh_fail) EXTERNAL_STAT(prefix_acl_refresh_success) EXTERNAL_STAT(prefix_acl_refresh_timeout) EXTERNAL_STAT(prefix_acl_refresh_error) + +#define GROUP visitor_stats +STUI(rim_report_failed, 0, 1) +#undef GROUP diff --git a/mcrouter/stats.h b/mcrouter/stats.h index 867cfe90b..6c14ef39a 100644 --- a/mcrouter/stats.h +++ b/mcrouter/stats.h @@ -77,6 +77,7 @@ enum stat_group_t { suspect_server_stats = 0x40000, external_stats = 0x80000, unknown_stats = 0x10000000, + visitor_stats = 0x20000000, }; /** defines a statistic: name, type, and data */