/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 64 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 75 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 77 ASSERT_EQ(1u, buckets[eventKey].size()); in TEST() 78 EXPECT_EQ(durationTimeNs, buckets[eventKey][0].mDuration); in TEST() 82 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "event"); in TEST() local 95 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 105 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 106 ASSERT_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 65 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 79 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() 80 ASSERT_EQ(1u, buckets[eventKey].size()); in TEST() 81 EXPECT_EQ(20LL, buckets[eventKey][0].mDuration); in TEST() 85 const MetricDimensionKey eventKey = getMockedMetricDimensionKey(TagId, 0, "1"); in TEST() local 99 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 109 EXPECT_TRUE(buckets.find(eventKey) == buckets.end()); in TEST() 112 EXPECT_TRUE(buckets.find(eventKey) != buckets.end()); in TEST() [all …]
|
/frameworks/base/cmds/statsd/src/metrics/duration_helper/ |
D | DurationTracker.h | 70 DurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in DurationTracker() argument 77 mEventKey(eventKey), in DurationTracker() 156 void addPastBucketToAnomalyTrackers(const MetricDimensionKey eventKey, in addPastBucketToAnomalyTrackers() argument 160 anomalyTracker->addPastBucket(eventKey, bucketValue, bucketNum); in addPastBucketToAnomalyTrackers() 181 void setEventKey(const MetricDimensionKey& eventKey) { in setEventKey() argument 182 mEventKey = eventKey; in setEventKey()
|
D | OringDurationTracker.h | 30 const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard,
|
D | MaxDurationTracker.h | 31 MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
|
D | MaxDurationTracker.cpp | 28 const MetricDimensionKey& eventKey, in MaxDurationTracker() argument 34 : DurationTracker(key, id, eventKey, wizard, conditionIndex, nesting, currentBucketStartNs, in MaxDurationTracker()
|
D | OringDurationTracker.cpp | 28 const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in OringDurationTracker() argument 32 : DurationTracker(key, id, eventKey, wizard, conditionIndex, nesting, currentBucketStartNs, in OringDurationTracker()
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | CountMetricProducer.cpp | 279 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 289 auto it = mCurrentSlicedCounter->find(eventKey); in onMatchedLogEventInternalLocked() 292 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 296 (*mCurrentSlicedCounter)[eventKey] = 1; in onMatchedLogEventInternalLocked() 303 int64_t countWholeBucket = mCurrentSlicedCounter->find(eventKey)->second; in onMatchedLogEventInternalLocked() 304 auto prev = mCurrentFullCounters->find(eventKey); in onMatchedLogEventInternalLocked() 308 tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey, in onMatchedLogEventInternalLocked() 312 VLOG("metric %lld %s->%lld", (long long)mMetricId, eventKey.toString().c_str(), in onMatchedLogEventInternalLocked() 313 (long long)(*mCurrentSlicedCounter)[eventKey]); in onMatchedLogEventInternalLocked()
|
D | DurationMetricProducer.h | 65 const size_t matcherIndex, const MetricDimensionKey& eventKey, 70 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys, 144 const MetricDimensionKey& eventKey) const;
|
D | DurationMetricProducer.cpp | 193 const MetricDimensionKey& eventKey) const { in createDurationTracker() 197 mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, mNested, in createDurationTracker() 202 mConfigKey, mMetricId, eventKey, mWizard, mConditionTrackerIndex, mNested, in createDurationTracker() 503 void DurationMetricProducer::handleStartEvent(const MetricDimensionKey& eventKey, in handleStartEvent() argument 506 const auto& whatKey = eventKey.getDimensionKeyInWhat(); in handleStartEvent() 509 if (hitGuardRailLocked(eventKey)) { in handleStartEvent() 512 mCurrentSlicedDurationTrackerMap[whatKey] = createDurationTracker(eventKey); in handleStartEvent() 534 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument
|
D | GaugeMetricProducer.cpp | 454 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 475 if (mCurrentSlicedBucket->find(eventKey) != mCurrentSlicedBucket->end() && in onMatchedLogEventInternalLocked() 479 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 482 if ((*mCurrentSlicedBucket)[eventKey].size() >= mGaugeAtomsPerDimensionLimit) { in onMatchedLogEventInternalLocked() 488 (*mCurrentSlicedBucket)[eventKey].push_back(gaugeAtom); in onMatchedLogEventInternalLocked() 502 eventKey, gaugeVal); in onMatchedLogEventInternalLocked()
|
D | EventMetricProducer.h | 50 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | ValueMetricProducer.cpp | 737 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument 740 auto whatKey = eventKey.getDimensionKeyInWhat(); in onMatchedLogEventInternalLocked() 741 auto stateKey = eventKey.getStateValuesKey(); in onMatchedLogEventInternalLocked() 782 if (hitGuardRailLocked(eventKey)) { in onMatchedLogEventInternalLocked() 917 auto prev = mCurrentFullBucket.find(eventKey); in onMatchedLogEventInternalLocked() 922 tracker->detectAndDeclareAnomaly(eventTimeNs, mCurrentBucketNum, mMetricId, eventKey, in onMatchedLogEventInternalLocked()
|
D | CountMetricProducer.h | 62 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | GaugeMetricProducer.h | 101 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | EventMetricProducer.cpp | 146 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument
|
D | ValueMetricProducer.h | 98 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|
D | MetricProducer.h | 335 const size_t matcherIndex, const MetricDimensionKey& eventKey,
|