|
|
@ -217,7 +217,7 @@ TEST_F(MetricsTest, Int64CallbackGauge) { |
|
|
|
auto plugin3 = MakeStatsPluginForTarget(kDomain1To4); |
|
|
|
auto plugin3 = MakeStatsPluginForTarget(kDomain1To4); |
|
|
|
// Register two callbacks that set the same metric but with different
|
|
|
|
// Register two callbacks that set the same metric but with different
|
|
|
|
// label values. The callbacks get used only by plugin1.
|
|
|
|
// label values. The callbacks get used only by plugin1.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1"; |
|
|
|
auto group1 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group1 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain3To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain3To4, "")); |
|
|
|
auto callback1 = group1.RegisterCallback( |
|
|
|
auto callback1 = group1.RegisterCallback( |
|
|
@ -278,7 +278,7 @@ TEST_F(MetricsTest, Int64CallbackGauge) { |
|
|
|
callback1.reset(); |
|
|
|
callback1.reset(); |
|
|
|
callback2.reset(); |
|
|
|
callback2.reset(); |
|
|
|
// Now register callbacks that hit both plugin1 and plugin2.
|
|
|
|
// Now register callbacks that hit both plugin1 and plugin2.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1, plugin2"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1, plugin2"; |
|
|
|
auto group2 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group2 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain2To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain2To4, "")); |
|
|
|
callback1 = group2.RegisterCallback( |
|
|
|
callback1 = group2.RegisterCallback( |
|
|
@ -339,7 +339,7 @@ TEST_F(MetricsTest, Int64CallbackGauge) { |
|
|
|
callback1.reset(); |
|
|
|
callback1.reset(); |
|
|
|
callback2.reset(); |
|
|
|
callback2.reset(); |
|
|
|
// Now register callbacks that hit all three plugins.
|
|
|
|
// Now register callbacks that hit all three plugins.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1, plugin2, plugin3"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1, plugin2, plugin3"; |
|
|
|
auto group3 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group3 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain1To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain1To4, "")); |
|
|
|
callback1 = group3.RegisterCallback( |
|
|
|
callback1 = group3.RegisterCallback( |
|
|
@ -422,7 +422,7 @@ TEST_F(MetricsTest, DoubleCallbackGauge) { |
|
|
|
auto plugin3 = MakeStatsPluginForTarget(kDomain1To4); |
|
|
|
auto plugin3 = MakeStatsPluginForTarget(kDomain1To4); |
|
|
|
// Register two callbacks that set the same metric but with different
|
|
|
|
// Register two callbacks that set the same metric but with different
|
|
|
|
// label values. The callbacks get used only by plugin1.
|
|
|
|
// label values. The callbacks get used only by plugin1.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1"; |
|
|
|
auto group1 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group1 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain3To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain3To4, "")); |
|
|
|
auto callback1 = group1.RegisterCallback( |
|
|
|
auto callback1 = group1.RegisterCallback( |
|
|
@ -483,7 +483,7 @@ TEST_F(MetricsTest, DoubleCallbackGauge) { |
|
|
|
callback1.reset(); |
|
|
|
callback1.reset(); |
|
|
|
callback2.reset(); |
|
|
|
callback2.reset(); |
|
|
|
// Now register callbacks that hit both plugin1 and plugin2.
|
|
|
|
// Now register callbacks that hit both plugin1 and plugin2.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1, plugin2"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1, plugin2"; |
|
|
|
auto group2 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group2 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain2To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain2To4, "")); |
|
|
|
callback1 = group2.RegisterCallback( |
|
|
|
callback1 = group2.RegisterCallback( |
|
|
@ -544,7 +544,7 @@ TEST_F(MetricsTest, DoubleCallbackGauge) { |
|
|
|
callback1.reset(); |
|
|
|
callback1.reset(); |
|
|
|
callback2.reset(); |
|
|
|
callback2.reset(); |
|
|
|
// Now register callbacks that hit all three plugins.
|
|
|
|
// Now register callbacks that hit all three plugins.
|
|
|
|
gpr_log(GPR_INFO, "testing callbacks for: plugin1, plugin2, plugin3"); |
|
|
|
LOG(INFO) << "testing callbacks for: plugin1, plugin2, plugin3"; |
|
|
|
auto group3 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
auto group3 = GlobalStatsPluginRegistry::GetStatsPluginsForChannel( |
|
|
|
StatsPluginChannelScope(kDomain1To4, "")); |
|
|
|
StatsPluginChannelScope(kDomain1To4, "")); |
|
|
|
callback1 = group3.RegisterCallback( |
|
|
|
callback1 = group3.RegisterCallback( |
|
|
|