Home
last modified time | relevance | path

Searched refs:mAlarms (Results 1 – 4 of 4) sorted by relevance

/frameworks/base/cmds/statsd/src/anomaly/
DDurationAnomalyTracker.cpp47 auto itr = mAlarms.find(dimensionKey); in startAlarm()
48 if (itr != mAlarms.end() && mAlarmMonitor != nullptr) { in startAlarm()
53 mAlarms[dimensionKey] = alarm; in startAlarm()
61 const auto itr = mAlarms.find(dimensionKey); in stopAlarm()
62 if (itr == mAlarms.end()) { in stopAlarm()
75 mAlarms.erase(dimensionKey); in stopAlarm()
80 for (const auto& itr : mAlarms) { in cancelAllAlarms()
84 mAlarms.clear(); in cancelAllAlarms()
90 if (firedAlarms.empty() || mAlarms.empty()) return; in informAlarmsFired()
97 for (const auto& kv : mAlarms) { in informAlarmsFired()
[all …]
DDurationAnomalyTracker.h58 auto it = mAlarms.find(dimensionKey); in getAlarmTimestampSec()
59 return it == mAlarms.end() ? 0 : it->second->timestampSec; in getAlarmTimestampSec()
64 std::unordered_map<MetricDimensionKey, sp<const InternalAlarm>> mAlarms; variable
/frameworks/base/cmds/statsd/tests/metrics/
DMaxDurationTracker_test.cpp281 sp<const InternalAlarm> alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
286 EXPECT_EQ(0U, anomalyTracker->mAlarms.size()); in TEST()
290 EXPECT_EQ(1U, anomalyTracker->mAlarms.size()); in TEST()
291 alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
345 EXPECT_EQ(1U, anomalyTracker->mAlarms.size()); in TEST()
346 auto alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
356 EXPECT_EQ(0u, anomalyTracker->mAlarms.size()); in TEST()
367 EXPECT_EQ(1U, anomalyTracker->mAlarms.size()); in TEST()
368 alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
375 alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
[all …]
DOringDurationTracker_test.cpp507 EXPECT_EQ(1u, anomalyTracker->mAlarms.size()); in TEST()
509 (long long)(anomalyTracker->mAlarms.begin()->second->timestampSec * NS_PER_SEC)); in TEST()
549 EXPECT_EQ(1u, anomalyTracker->mAlarms.size()); in TEST()
550 sp<const InternalAlarm> alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
555 EXPECT_EQ(0u, anomalyTracker->mAlarms.size()); in TEST()
559 EXPECT_EQ(1u, anomalyTracker->mAlarms.size()); in TEST()
560 alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
565 EXPECT_EQ(1u, anomalyTracker->mAlarms.size()); in TEST()
566 alarm = anomalyTracker->mAlarms.begin()->second; in TEST()
571 EXPECT_EQ(1u, anomalyTracker->mAlarms.size()); in TEST()
[all …]