Statsd anomaly detection - fixes
Fixes a few items in AnomalyTracker, especially to do with what happens
when an anomaly alarm fires.
Test: unit tests still pass
Change-Id: Ia89bd617442e952e587336b890c3ca67430b5e21
diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp
index c866951..e986c1a 100644
--- a/cmds/statsd/src/metrics/MetricsManager.cpp
+++ b/cmds/statsd/src/metrics/MetricsManager.cpp
@@ -168,9 +168,9 @@
}
void MetricsManager::onAnomalyAlarmFired(const uint64_t timestampNs,
- sp<const AnomalyAlarm> anomaly) {
+ unordered_set<sp<const AnomalyAlarm>, SpHash<AnomalyAlarm>>& anomalySet) {
for (const auto& itr : mAllAnomalyTrackers) {
- itr->declareAnomaly(timestampNs);
+ itr->informAlarmsFired(timestampNs, anomalySet);
}
}