/packages/modules/StatsD/statsd/src/anomaly/ |
D | AnomalyTracker.h | 62 void addPastBucket(const MetricDimensionKey& key, const int64_t& bucketValue, 68 bool detectAnomaly(const int64_t& currBucketNum, const MetricDimensionKey& key, 72 void declareAnomaly(const int64_t& timestampNs, int64_t metricId, const MetricDimensionKey& key, 80 int64_t metricId, const MetricDimensionKey& key, 89 int64_t getSumOverPastBuckets(const MetricDimensionKey& key) const; 92 int64_t getPastBucketValue(const MetricDimensionKey& key, const int64_t& bucketNum) const; 102 uint32_t getRefractoryPeriodEndsSec(const MetricDimensionKey& key) const { in getRefractoryPeriodEndsSec() 116 virtual void startAlarm(const MetricDimensionKey& dimensionKey, const int64_t& eventTime) { in startAlarm() 123 virtual void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs) { in stopAlarm() 154 virtual uint32_t getAlarmTimestampSec(const MetricDimensionKey& dimensionKey) const { in getAlarmTimestampSec() [all …]
|
D | AnomalyTracker.cpp | 92 void AnomalyTracker::addPastBucket(const MetricDimensionKey& key, in addPastBucket() 151 void AnomalyTracker::subtractValueFromSum(const MetricDimensionKey& key, in subtractValueFromSum() 173 int64_t AnomalyTracker::getPastBucketValue(const MetricDimensionKey& key, in getPastBucketValue() 189 int64_t AnomalyTracker::getSumOverPastBuckets(const MetricDimensionKey& key) const { in getSumOverPastBuckets() 198 const MetricDimensionKey& key, in detectAnomaly() 210 const MetricDimensionKey& key, int64_t metricValue) { in declareAnomaly() 242 const MetricDimensionKey& key, in detectAndDeclareAnomaly() 250 const MetricDimensionKey& key) const { in isInRefractoryPeriod() 267 void AnomalyTracker::informSubscribers(const MetricDimensionKey& key, int64_t metric_id, in informSubscribers() 316 MetricDimensionKey metricKey = loadMetricDimensionKeyFromProto( in loadAlertMetadata()
|
D | DurationAnomalyTracker.h | 37 void startAlarm(const MetricDimensionKey& dimensionKey, const int64_t& eventTime) override; 42 void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs) override; 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()
|
/packages/modules/StatsD/statsd/src/ |
D | HashableDimensionKey.h | 98 class MetricDimensionKey { 100 explicit MetricDimensionKey(const HashableDimensionKey& dimensionKeyInWhat, in MetricDimensionKey() function 104 MetricDimensionKey(){}; in MetricDimensionKey() function 106 MetricDimensionKey(const MetricDimensionKey& that) in MetricDimensionKey() function 110 MetricDimensionKey& operator=(const MetricDimensionKey& from) = default; 134 bool operator==(const MetricDimensionKey& that) const; 136 bool operator<(const MetricDimensionKey& that) const; 230 using android::os::statsd::MetricDimensionKey; 240 struct hash<MetricDimensionKey> { 241 std::size_t operator()(const MetricDimensionKey& key) const {
|
D | metadata_util.h | 24 void writeMetricDimensionKeyToMetadataDimensionKey(const MetricDimensionKey& metricKey, 25 metadata::MetricDimensionKey* metadataMetricKey); 27 MetricDimensionKey loadMetricDimensionKeyFromProto( 28 const metadata::MetricDimensionKey& metricDimensionKey);
|
D | metadata_util.cpp | 54 const MetricDimensionKey& metricKey, in writeMetricDimensionKeyToMetadataDimensionKey() 55 metadata::MetricDimensionKey* metadataMetricKey) { in writeMetricDimensionKeyToMetadataDimensionKey() 106 MetricDimensionKey loadMetricDimensionKeyFromProto( in loadMetricDimensionKeyFromProto() 107 const metadata::MetricDimensionKey& metricDimensionKey) { in loadMetricDimensionKeyFromProto() 116 MetricDimensionKey metricKey(dimKeyInWhat, stateValues); in loadMetricDimensionKeyFromProto()
|
D | stats_util.h | 38 const MetricDimensionKey DEFAULT_METRIC_DIMENSION_KEY = MetricDimensionKey(); 42 typedef std::unordered_map<MetricDimensionKey, int64_t> DimToValMap;
|
D | HashableDimensionKey.cpp | 351 bool MetricDimensionKey::operator==(const MetricDimensionKey& that) const { in operator ==() 356 string MetricDimensionKey::toString() const { in toString() 360 bool MetricDimensionKey::operator<(const MetricDimensionKey& that) const { in operator <()
|
/packages/modules/StatsD/statsd/tests/anomaly/ |
D | AnomalyTracker_test.cpp | 39 MetricDimensionKey getMockMetricDimensionKey(int key, string value) { in getMockMetricDimensionKey() 43 return MetricDimensionKey(dim, DEFAULT_DIMENSION_KEY); in getMockMetricDimensionKey() 46 void AddValueToBucket(const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list, in AddValueToBucket() argument 54 const std::vector<std::pair<MetricDimensionKey, long>>& key_value_pair_list) { in MockBucket() argument 62 const MetricDimensionKey& key) { in getBucketValue() 74 const std::set<const MetricDimensionKey>& trueList, in detectAnomaliesPass() 75 const std::set<const MetricDimensionKey>& falseList) { in detectAnomaliesPass() 76 for (const MetricDimensionKey& key : trueList) { in detectAnomaliesPass() 81 for (const MetricDimensionKey& key : falseList) { in detectAnomaliesPass() 107 const std::unordered_map<MetricDimensionKey, int64_t>& timestamps) { in checkRefractoryTimes() argument [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | MaxDurationTracker_test.cpp | 46 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); 53 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 60 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 87 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 93 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 122 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 127 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 161 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() 166 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 202 MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 1, "1"); in TEST() [all …]
|
D | OringDurationTracker_test.cpp | 43 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); 51 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() 89 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 112 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 120 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 142 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() 148 unordered_map<MetricDimensionKey, vector<DurationBucket>> buckets; in TEST() 179 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() [all …]
|
D | metrics_test_helper.cpp | 37 MetricDimensionKey getMockedMetricDimensionKey(int tagId, int key, string value) { in getMockedMetricDimensionKey() 38 return MetricDimensionKey(getMockedDimensionKey(tagId, key, value), DEFAULT_DIMENSION_KEY); in getMockedMetricDimensionKey() 41 MetricDimensionKey getMockedStateDimensionKey(int tagId, int key, int64_t value) { in getMockedStateDimensionKey() 42 return MetricDimensionKey(DEFAULT_DIMENSION_KEY, in getMockedStateDimensionKey()
|
/packages/modules/StatsD/statsd/tests/ |
D | metadata_util_test.cpp | 52 MetricDimensionKey dimKey(dim, dim2); in TEST() 54 metadata::MetricDimensionKey metadataDimKey; in TEST() 57 MetricDimensionKey loadedDimKey = loadMetricDimensionKeyFromProto(metadataDimKey); in TEST() 60 ASSERT_EQ(std::hash<MetricDimensionKey>{}(loadedDimKey), in TEST() 61 std::hash<MetricDimensionKey>{}(dimKey)); in TEST()
|
/packages/modules/StatsD/statsd/src/metrics/duration_helper/ |
D | DurationTracker.h | 71 DurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in DurationTracker() 116 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0; 122 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0; 183 void addPastBucketToAnomalyTrackers(const MetricDimensionKey eventKey, in addPastBucketToAnomalyTrackers() 208 void setEventKey(const MetricDimensionKey& eventKey) { in setEventKey() 242 MetricDimensionKey mEventKey;
|
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.h | 31 MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, 47 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override; 50 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>*) override;
|
D | OringDurationTracker.cpp | 28 const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in OringDurationTracker() 136 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) { in flushCurrentBucket() argument 172 (*output)[MetricDimensionKey(mEventKey.getDimensionKeyInWhat(), durationIt.first)] in flushCurrentBucket() 184 MetricDimensionKey(mEventKey.getDimensionKeyInWhat(), durationIt.first), in flushCurrentBucket() 228 unordered_map<MetricDimensionKey, vector<DurationBucket>>* output) { in flushIfNeeded() argument
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | DurationMetricProducer.h | 74 const size_t matcherIndex, const MetricDimensionKey& eventKey, 85 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys, 171 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets; 179 const MetricDimensionKey& eventKey) const; 182 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | ValueMetricProducer.h | 101 const size_t matcherIndex, const MetricDimensionKey& eventKey, 244 std::unordered_map<MetricDimensionKey, CurrentValueBucket> mCurrentSlicedBucket; 249 std::unordered_map<MetricDimensionKey, int64_t> mCurrentFullBucket; 252 std::unordered_map<MetricDimensionKey, std::vector<PastValueBucket>> mPastBuckets; 257 bool hitGuardRailLocked(const MetricDimensionKey& newKey); 261 bool hitFullBucketGuardRailLocked(const MetricDimensionKey& newKey);
|
D | GaugeMetricProducer.h | 50 typedef std::unordered_map<MetricDimensionKey, std::vector<GaugeAtom>> 106 const size_t matcherIndex, const MetricDimensionKey& eventKey, 179 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets; 205 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | CountMetricProducer.h | 66 const size_t matcherIndex, const MetricDimensionKey& eventKey, 116 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets; 127 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
|
D | DurationMetricProducer.cpp | 329 const MetricDimensionKey& eventKey) const { in createDurationTracker() 524 const MetricDimensionKey& dimensionKey = pair.first; in onDumpReportLocked() 619 bool DurationMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) { in hitGuardRailLocked() 639 void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey, in handleStartEvent() 668 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() 778 handleStartEvent(MetricDimensionKey(dimensionInWhat, stateValuesKey), conditionKey, condition, in handleMatchedLogEventValuesLocked()
|
/packages/modules/StatsD/statsd/tests/e2e/ |
D | Anomaly_count_e2e_test.cpp | 90 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 95 MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY); in TEST() 201 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 297 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST() 325 metadata::MetricDimensionKey metadataDimKey = keyedData.dimension_key(); in TEST() 360 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST()
|
/packages/modules/StatsD/statsd/src/subscriber/ |
D | SubscriberReporter.h | 75 const MetricDimensionKey& dimKey) const; 93 const MetricDimensionKey& dimKey) const;
|