/frameworks/base/cmds/statsd/src/anomaly/ |
D | AnomalyTracker.h | 58 void addPastBucket(const MetricDimensionKey& key, const int64_t& bucketValue, 64 bool detectAnomaly(const int64_t& currBucketNum, const MetricDimensionKey& key, 68 void declareAnomaly(const int64_t& timestampNs, int64_t metricId, const MetricDimensionKey& key, 76 int64_t metricId, const MetricDimensionKey& key, 85 int64_t getSumOverPastBuckets(const MetricDimensionKey& key) const; 88 int64_t getPastBucketValue(const MetricDimensionKey& key, const int64_t& bucketNum) const; 98 uint32_t getRefractoryPeriodEndsSec(const MetricDimensionKey& key) const { in getRefractoryPeriodEndsSec() 119 virtual uint32_t getAlarmTimestampSec(const MetricDimensionKey& dimensionKey) const { in getAlarmTimestampSec() 151 unordered_map<MetricDimensionKey, uint32_t> mRefractoryPeriodEndsSec; 166 void subtractValueFromSum(const MetricDimensionKey& key, const int64_t& bucketValue); [all …]
|
D | AnomalyTracker.cpp | 94 void AnomalyTracker::addPastBucket(const MetricDimensionKey& key, in addPastBucket() 153 void AnomalyTracker::subtractValueFromSum(const MetricDimensionKey& key, in subtractValueFromSum() 175 int64_t AnomalyTracker::getPastBucketValue(const MetricDimensionKey& key, in getPastBucketValue() 191 int64_t AnomalyTracker::getSumOverPastBuckets(const MetricDimensionKey& key) const { in getSumOverPastBuckets() 200 const MetricDimensionKey& key, in detectAnomaly() 212 const MetricDimensionKey& key, int64_t metricValue) { in declareAnomaly() 244 const MetricDimensionKey& key, in detectAndDeclareAnomaly() 252 const MetricDimensionKey& key) const { in isInRefractoryPeriod() 260 void AnomalyTracker::informSubscribers(const MetricDimensionKey& key, int64_t metric_id, in informSubscribers()
|
D | DurationAnomalyTracker.h | 37 void startAlarm(const MetricDimensionKey& dimensionKey, const int64_t& eventTime); 42 void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs); 57 uint32_t getAlarmTimestampSec(const MetricDimensionKey& dimensionKey) const override { in getAlarmTimestampSec() 64 std::unordered_map<MetricDimensionKey, sp<const InternalAlarm>> mAlarms;
|
D | DurationAnomalyTracker.cpp | 38 void DurationAnomalyTracker::startAlarm(const MetricDimensionKey& dimensionKey, in startAlarm() 59 void DurationAnomalyTracker::stopAlarm(const MetricDimensionKey& dimensionKey, in stopAlarm() 96 unordered_map<MetricDimensionKey, sp<const InternalAlarm>> matchedAlarms; in informAlarmsFired()
|
D | subscriber_util.h | 28 const MetricDimensionKey& dimensionKey, int64_t metricValue,
|
/frameworks/base/cmds/statsd/src/ |
D | HashableDimensionKey.h | 78 class MetricDimensionKey { 80 explicit MetricDimensionKey(const HashableDimensionKey& dimensionKeyInWhat, in MetricDimensionKey() function 85 MetricDimensionKey(){}; in MetricDimensionKey() function 87 MetricDimensionKey(const MetricDimensionKey& that) in MetricDimensionKey() function 91 MetricDimensionKey& operator=(const MetricDimensionKey& from) = default; 111 bool operator==(const MetricDimensionKey& that) const; 113 bool operator<(const MetricDimensionKey& that) const; 155 using android::os::statsd::MetricDimensionKey; 165 struct hash<MetricDimensionKey> { 166 std::size_t operator()(const MetricDimensionKey& key) const {
|
D | stats_util.h | 28 const MetricDimensionKey DEFAULT_METRIC_DIMENSION_KEY = MetricDimensionKey(); 32 typedef std::unordered_map<MetricDimensionKey, int64_t> DimToValMap;
|
D | HashableDimensionKey.cpp | 174 bool MetricDimensionKey::operator==(const MetricDimensionKey& that) const { in operator ==() 179 string MetricDimensionKey::toString() const { in toString() 183 bool MetricDimensionKey::operator<(const MetricDimensionKey& that) const { in operator <()
|
/frameworks/base/cmds/statsd/tests/anomaly/ |
D | AnomalyTracker_test.cpp | 37 MetricDimensionKey getMockMetricDimensionKey(int key, string value) { in getMockMetricDimensionKey() 41 return MetricDimensionKey(dim, DEFAULT_DIMENSION_KEY); in getMockMetricDimensionKey() 44 void AddValueToBucket(const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list, in AddValueToBucket() argument 52 const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list) { in MockBucket() argument 60 const MetricDimensionKey& key) { in getBucketValue() 72 const std::set<const MetricDimensionKey>& trueList, in detectAnomaliesPass() 73 const std::set<const MetricDimensionKey>& falseList) { in detectAnomaliesPass() 74 for (const MetricDimensionKey& key : trueList) { in detectAnomaliesPass() 79 for (const MetricDimensionKey& key : falseList) { in detectAnomaliesPass() 105 const std::unordered_map<MetricDimensionKey, int64_t>& timestamps) { in checkRefractoryTimes() argument [all …]
|
/frameworks/base/cmds/statsd/tests/metrics/ |
D | MaxDurationTracker_test.cpp | 51 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 59 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 87 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 94 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 124 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 130 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 165 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 171 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 209 MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 1, "1"); in TEST() 234 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() [all …]
|
D | OringDurationTracker_test.cpp | 50 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 57 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 83 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 90 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 114 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 123 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 146 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 153 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 185 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 198 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() [all …]
|
D | metrics_test_helper.cpp | 29 MetricDimensionKey getMockedMetricDimensionKey(int tagId, int key, string value) { in getMockedMetricDimensionKey() 30 return MetricDimensionKey(getMockedDimensionKey(tagId, key, value), DEFAULT_DIMENSION_KEY); in getMockedMetricDimensionKey()
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | DurationMetricProducer.h | 56 const size_t matcherIndex, const MetricDimensionKey& eventKey, 61 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys, 127 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets; 136 const MetricDimensionKey& eventKey) const; 142 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | ValueMetricProducer.h | 81 const size_t matcherIndex, const MetricDimensionKey& eventKey, 141 std::set<MetricDimensionKey> mMatchedMetricDimensionKeys; 168 std::unordered_map<MetricDimensionKey, std::vector<Interval>> mCurrentSlicedBucket; 170 std::unordered_map<MetricDimensionKey, int64_t> mCurrentFullBucket; 173 std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>> mPastBuckets; 181 bool hitGuardRailLocked(const MetricDimensionKey& newKey); 184 bool hitFullBucketGuardRailLocked(const MetricDimensionKey& newKey);
|
D | CountMetricProducer.h | 51 const size_t matcherIndex, const MetricDimensionKey& eventKey, 85 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets; 96 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | GaugeMetricProducer.h | 50 typedef std::unordered_map<MetricDimensionKey, std::vector<GaugeAtom>> 93 const size_t matcherIndex, const MetricDimensionKey& eventKey, 150 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets; 179 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | DurationMetricProducer.cpp | 162 const MetricDimensionKey& eventKey) const { in createDurationTracker() 322 auto newEventKey = MetricDimensionKey(whatIt.first, trueDim); in onSlicedConditionMayChangeLocked_opt2() 380 auto newEventKey = MetricDimensionKey(whatIt.first, conditionDimension); in onSlicedConditionMayChangeInternalLocked() 387 newTracker->setEventKey(MetricDimensionKey(newEventKey)); in onSlicedConditionMayChangeInternalLocked() 410 auto newEventKey = MetricDimensionKey(whatIt.first, conditionDimension); in onSlicedConditionMayChangeInternalLocked() 542 const MetricDimensionKey& dimensionKey = pair.first; in onDumpReportLocked() 654 bool DurationMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) { in hitGuardRailLocked() 689 void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey, in handleStartEvent() 730 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() 819 handleStartEvent(MetricDimensionKey(dimensionInWhat, DEFAULT_DIMENSION_KEY), in onMatchedLogEventLocked() [all …]
|
/frameworks/base/cmds/statsd/src/metrics/duration_helper/ |
D | DurationTracker.h | 61 DurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in DurationTracker() 101 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0; 107 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0; 115 void setEventKey(const MetricDimensionKey& eventKey) { in setEventKey() 175 MetricDimensionKey mEventKey;
|
D | MaxDurationTracker.h | 31 MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, 51 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override; 54 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>*) override;
|
D | OringDurationTracker.h | 30 const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard, 52 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override; 55 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
|
D | MaxDurationTracker.cpp | 28 const MetricDimensionKey& eventKey, in MaxDurationTracker() 190 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) { in flushCurrentBucket() argument 241 int64_t eventTimeNs, unordered_map<MetricDimensionKey, vector<DurationBucket>>* output) { in flushIfNeeded() argument
|
/frameworks/base/cmds/statsd/src/subscriber/ |
D | SubscriberReporter.h | 83 const MetricDimensionKey& dimKey) const; 107 const MetricDimensionKey& dimKey) const;
|
D | IncidentdReporter.h | 31 const MetricDimensionKey& dimensionKey, int64_t metricValue,
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | Anomaly_count_e2e_test.cpp | 89 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 94 MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY); in TEST() 192 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 197 MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY); in TEST()
|
D | ConfigTtl_e2e_test.cpp | 80 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 85 MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY); in TEST()
|