Loading cmds/statsd/src/guardrail/StatsdStats.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ void StatsdStats::addSubStatsToConfigLocked(const ConfigKey& key, for (const auto& stats : alertStats) { auto output = configStats.add_alert_stats(); output->set_name(stats.first); output->set_declared_times(stats.second); output->set_alerted_times(stats.second); VLOG("alert %s declared %d times", stats.first.c_str(), stats.second); } } Loading cmds/statsd/src/stats_log.proto +1 −1 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ message StatsdStatsReport { message AlertStats { optional string name = 1; optional int32 declared_times = 2; optional int32 alerted_times = 2; } message ConfigStats { Loading cmds/statsd/tests/guardrail/StatsdStats_test.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -163,9 +163,9 @@ TEST(StatsdStatsTest, TestSubStats) { EXPECT_EQ(2, configReport.alert_stats_size()); bool alert1first = !configReport.alert_stats(0).name().compare("alert1"); EXPECT_EQ("alert1", configReport.alert_stats(alert1first ? 0 : 1).name()); EXPECT_EQ(2, configReport.alert_stats(alert1first ? 0 : 1).declared_times()); EXPECT_EQ(2, configReport.alert_stats(alert1first ? 0 : 1).alerted_times()); EXPECT_EQ("alert2", configReport.alert_stats(alert1first ? 1 : 0).name()); EXPECT_EQ(1, configReport.alert_stats(alert1first ? 1 : 0).declared_times()); EXPECT_EQ(1, configReport.alert_stats(alert1first ? 1 : 0).alerted_times()); EXPECT_EQ(1, configReport.condition_stats_size()); EXPECT_EQ("condition1", configReport.condition_stats(0).name()); Loading Loading @@ -201,7 +201,7 @@ TEST(StatsdStatsTest, TestSubStats) { EXPECT_EQ(1, configReport2.alert_stats_size()); EXPECT_EQ("alert99", configReport2.alert_stats(0).name()); EXPECT_EQ(1, configReport2.alert_stats(0).declared_times()); EXPECT_EQ(1, configReport2.alert_stats(0).alerted_times()); } TEST(StatsdStatsTest, TestAtomLog) { Loading Loading
cmds/statsd/src/guardrail/StatsdStats.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ void StatsdStats::addSubStatsToConfigLocked(const ConfigKey& key, for (const auto& stats : alertStats) { auto output = configStats.add_alert_stats(); output->set_name(stats.first); output->set_declared_times(stats.second); output->set_alerted_times(stats.second); VLOG("alert %s declared %d times", stats.first.c_str(), stats.second); } } Loading
cmds/statsd/src/stats_log.proto +1 −1 Original line number Diff line number Diff line Loading @@ -195,7 +195,7 @@ message StatsdStatsReport { message AlertStats { optional string name = 1; optional int32 declared_times = 2; optional int32 alerted_times = 2; } message ConfigStats { Loading
cmds/statsd/tests/guardrail/StatsdStats_test.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -163,9 +163,9 @@ TEST(StatsdStatsTest, TestSubStats) { EXPECT_EQ(2, configReport.alert_stats_size()); bool alert1first = !configReport.alert_stats(0).name().compare("alert1"); EXPECT_EQ("alert1", configReport.alert_stats(alert1first ? 0 : 1).name()); EXPECT_EQ(2, configReport.alert_stats(alert1first ? 0 : 1).declared_times()); EXPECT_EQ(2, configReport.alert_stats(alert1first ? 0 : 1).alerted_times()); EXPECT_EQ("alert2", configReport.alert_stats(alert1first ? 1 : 0).name()); EXPECT_EQ(1, configReport.alert_stats(alert1first ? 1 : 0).declared_times()); EXPECT_EQ(1, configReport.alert_stats(alert1first ? 1 : 0).alerted_times()); EXPECT_EQ(1, configReport.condition_stats_size()); EXPECT_EQ("condition1", configReport.condition_stats(0).name()); Loading Loading @@ -201,7 +201,7 @@ TEST(StatsdStatsTest, TestSubStats) { EXPECT_EQ(1, configReport2.alert_stats_size()); EXPECT_EQ("alert99", configReport2.alert_stats(0).name()); EXPECT_EQ(1, configReport2.alert_stats(0).declared_times()); EXPECT_EQ(1, configReport2.alert_stats(0).alerted_times()); } TEST(StatsdStatsTest, TestAtomLog) { Loading