/frameworks/base/cmds/statsd/tests/metrics/ |
D | OringDurationTracker_test.cpp | 42 const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "event"); variable 50 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() local 65 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, dimensionInCondition, in TEST() 76 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 78 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST() 79 EXPECT_EQ(durationTimeNs, buckets[eventKey][0].mDuration); in TEST() 83 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() local 97 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, dimensionInCondition, in TEST() 108 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 109 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST() [all …]
|
D | MaxDurationTracker_test.cpp | 44 const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "1"); variable 51 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() local 66 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, dimensionInCondition, in TEST() 81 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 82 EXPECT_EQ(1u, buckets[eventKey].size()); in TEST() 83 EXPECT_EQ(20LL, buckets[eventKey][0].mDuration); in TEST() 87 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() local 102 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, dimensionInCondition, in TEST() 113 EXPECT_TRUE(buckets.find(eventKey) == buckets.end()); in TEST() 116 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() [all …]
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | CountMetricProducer.cpp | 277 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 287 auto it = mCurrentSlicedCounter->find(eventKey); in onMatchedLogEventInternalLocked() 290 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 294 (*mCurrentSlicedCounter)[eventKey] = 1; in onMatchedLogEventInternalLocked() 301 int64_t countWholeBucket = mCurrentSlicedCounter->find(eventKey)->second; in onMatchedLogEventInternalLocked() 302 auto prev = mCurrentFullCounters->find(eventKey); in onMatchedLogEventInternalLocked() 306 tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey, in onMatchedLogEventInternalLocked() 310 VLOG("metric %lld %s->%lld", (long long)mMetricId, eventKey.toString().c_str(), in onMatchedLogEventInternalLocked() 311 (long long)(*mCurrentSlicedCounter)[eventKey]); in onMatchedLogEventInternalLocked()
|
D | DurationMetricProducer.h | 56 const size_t matcherIndex, const MetricDimensionKey& eventKey, 61 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys, 136 const MetricDimensionKey& eventKey) const;
|
D | DurationMetricProducer.cpp | 162 const MetricDimensionKey& eventKey) const { in createDurationTracker() 166 mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, in createDurationTracker() 172 mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, in createDurationTracker() 689 void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey, in handleStartEvent() argument 692 const auto& whatKey = eventKey.getDimensionKeyInWhat(); in handleStartEvent() 693 const auto& condKey = eventKey.getDimensionKeyInCondition(); in handleStartEvent() 697 if (hitGuardRailLocked(eventKey)) { in handleStartEvent() 700 mCurrentSlicedDurationTrackerMap[whatKey][condKey] = createDurationTracker(eventKey); in handleStartEvent() 703 if (hitGuardRailLocked(eventKey)) { in handleStartEvent() 706 mCurrentSlicedDurationTrackerMap[whatKey][condKey] = createDurationTracker(eventKey); in handleStartEvent() [all …]
|
D | GaugeMetricProducer.cpp | 460 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 481 if (mCurrentSlicedBucket->find(eventKey) != mCurrentSlicedBucket->end() && in onMatchedLogEventInternalLocked() 485 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 488 if ((*mCurrentSlicedBucket)[eventKey].size() >= mGaugeAtomsPerDimensionLimit) { in onMatchedLogEventInternalLocked() 492 (*mCurrentSlicedBucket)[eventKey].push_back(gaugeAtom); in onMatchedLogEventInternalLocked() 506 eventKey, gaugeVal); in onMatchedLogEventInternalLocked()
|
D | EventMetricProducer.h | 44 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | ValueMetricProducer.cpp | 665 const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 674 mMatchedMetricDimensionKeys.insert(eventKey); in onMatchedLogEventInternalLocked() 696 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 699 vector<Interval>& multiIntervals = mCurrentSlicedBucket[eventKey]; in onMatchedLogEventInternalLocked() 810 auto prev = mCurrentFullBucket.find(eventKey); in onMatchedLogEventInternalLocked() 815 tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey, in onMatchedLogEventInternalLocked()
|
D | CountMetricProducer.h | 51 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | GaugeMetricProducer.h | 93 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | EventMetricProducer.cpp | 140 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument
|
D | ValueMetricProducer.h | 81 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | MetricProducer.h | 378 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
/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() argument 69 mEventKey(eventKey), in DurationTracker() 115 void setEventKey(const MetricDimensionKey& eventKey) { in setEventKey() argument 116 mEventKey = eventKey; in setEventKey()
|
D | MaxDurationTracker.h | 31 MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
|
D | OringDurationTracker.h | 30 const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard,
|
D | MaxDurationTracker.cpp | 28 const MetricDimensionKey& eventKey, in MaxDurationTracker() argument 35 : DurationTracker(key, id, eventKey, wizard, conditionIndex, dimensionInCondition, nesting, in MaxDurationTracker()
|
D | OringDurationTracker.cpp | 28 const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in OringDurationTracker() argument 33 : DurationTracker(key, id, eventKey, wizard, conditionIndex, dimensionInCondition, nesting, in OringDurationTracker()
|