Home
last modified time | relevance | path

Searched refs:MetricDimensionKey (Results 1 – 25 of 36) sorted by relevance

12

/frameworks/base/cmds/statsd/src/anomaly/
DAnomalyTracker.h60 void addPastBucket(const MetricDimensionKey& key, const int64_t& bucketValue,
66 bool detectAnomaly(const int64_t& currBucketNum, const MetricDimensionKey& key,
70 void declareAnomaly(const int64_t& timestampNs, const MetricDimensionKey& key);
77 const MetricDimensionKey& key, const int64_t& currentBucketValue);
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 …]
DAnomalyTracker.cpp93 void AnomalyTracker::addPastBucket(const MetricDimensionKey& key, in addPastBucket()
152 void AnomalyTracker::subtractValueFromSum(const MetricDimensionKey& key, in subtractValueFromSum()
174 int64_t AnomalyTracker::getPastBucketValue(const MetricDimensionKey& key, in getPastBucketValue()
190 int64_t AnomalyTracker::getSumOverPastBuckets(const MetricDimensionKey& key) const { in getSumOverPastBuckets()
199 const MetricDimensionKey& key, in detectAnomaly()
210 void AnomalyTracker::declareAnomaly(const int64_t& timestampNs, const MetricDimensionKey& key) { in declareAnomaly()
240 const MetricDimensionKey& key, in detectAndDeclareAnomaly()
248 const MetricDimensionKey& key) const { in isInRefractoryPeriod()
256 void AnomalyTracker::informSubscribers(const MetricDimensionKey& key) { in informSubscribers()
DDurationAnomalyTracker.h37 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;
DDurationAnomalyTracker.cpp38 void DurationAnomalyTracker::startAlarm(const MetricDimensionKey& dimensionKey, in startAlarm()
59 void DurationAnomalyTracker::stopAlarm(const MetricDimensionKey& dimensionKey, in stopAlarm()
94 unordered_map<MetricDimensionKey, sp<const InternalAlarm>> matchedAlarms; in informAlarmsFired()
Dsubscriber_util.h28 const MetricDimensionKey& dimensionKey,
Dsubscriber_util.cpp34 const MetricDimensionKey& dimensionKey, in triggerSubscribers()
/frameworks/base/cmds/statsd/src/
DHashableDimensionKey.h78 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 {
Dstats_util.h29 const MetricDimensionKey DEFAULT_METRIC_DIMENSION_KEY = MetricDimensionKey();
33 typedef std::unordered_map<MetricDimensionKey, int64_t> DimToValMap;
DHashableDimensionKey.cpp178 bool MetricDimensionKey::operator==(const MetricDimensionKey& that) const { in operator ==()
183 string MetricDimensionKey::toString() const { in toString()
187 bool MetricDimensionKey::operator<(const MetricDimensionKey& that) const { in operator <()
/frameworks/base/cmds/statsd/tests/anomaly/
DAnomalyTracker_test.cpp37 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 (MetricDimensionKey key : trueList) { in detectAnomaliesPass()
79 for (MetricDimensionKey key : falseList) { in detectAnomaliesPass()
104 const std::unordered_map<MetricDimensionKey, int64_t>& timestamps) { in checkRefractoryTimes() argument
[all …]
/frameworks/base/cmds/statsd/tests/metrics/
DMaxDurationTracker_test.cpp51 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 …]
DOringDurationTracker_test.cpp50 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 …]
Dmetrics_test_helper.cpp29 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/
DDurationMetricProducer.h56 const size_t matcherIndex, const MetricDimensionKey& eventKey,
61 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys,
119 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets;
128 const MetricDimensionKey& eventKey) const;
134 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
DValueMetricProducer.h86 const size_t matcherIndex, const MetricDimensionKey& eventKey,
147 std::unordered_map<MetricDimensionKey, Interval> mCurrentSlicedBucket;
149 std::unordered_map<MetricDimensionKey, int64_t> mCurrentFullBucket;
153 std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>> mPastBuckets;
161 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
DCountMetricProducer.h52 const size_t matcherIndex, const MetricDimensionKey& eventKey,
84 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets;
95 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
DGaugeMetricProducer.h50 typedef std::unordered_map<MetricDimensionKey, std::vector<GaugeAtom>>
86 const size_t matcherIndex, const MetricDimensionKey& eventKey,
132 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets;
159 bool hitGuardRailLocked(const MetricDimensionKey& newKey);
DDurationMetricProducer.cpp161 const MetricDimensionKey& eventKey) const { in createDurationTracker()
321 auto newEventKey = MetricDimensionKey(whatIt.first, trueDim); in onSlicedConditionMayChangeLocked_opt2()
386 auto newEventKey = MetricDimensionKey(whatIt.first, conditionDimension); in onSlicedConditionMayChangeLocked()
393 newTracker->setEventKey(MetricDimensionKey(newEventKey)); in onSlicedConditionMayChangeLocked()
416 auto newEventKey = MetricDimensionKey(whatIt.first, conditionDimension); in onSlicedConditionMayChangeLocked()
494 const MetricDimensionKey& dimensionKey = pair.first; in onDumpReportLocked()
617 bool DurationMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) { in hitGuardRailLocked()
652 void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey, in handleStartEvent()
693 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked()
777 handleStartEvent(MetricDimensionKey(dimensionInWhat, DEFAULT_DIMENSION_KEY), in onMatchedLogEventLocked()
[all …]
/frameworks/base/cmds/statsd/src/metrics/duration_helper/
DDurationTracker.h62 DurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in DurationTracker()
102 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0;
108 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) = 0;
116 void setEventKey(const MetricDimensionKey& eventKey) { in setEventKey()
176 MetricDimensionKey mEventKey;
DMaxDurationTracker.h31 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;
DOringDurationTracker.h31 const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard,
53 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
56 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>>* output) override;
DMaxDurationTracker.cpp28 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/
DSubscriberReporter.h83 const MetricDimensionKey& dimKey) const;
107 const MetricDimensionKey& dimKey) const;
/frameworks/base/cmds/statsd/tests/e2e/
DConfigTtl_e2e_test.cpp80 MetricDimensionKey dimensionKey1(whatKey1, DEFAULT_DIMENSION_KEY); in TEST()
85 MetricDimensionKey dimensionKey2(whatKey2, DEFAULT_DIMENSION_KEY); in TEST()
DAnomaly_count_e2e_test.cpp89 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()

12