Home
last modified time | relevance | path

Searched refs:eventKey (Results 1 – 18 of 18) sorted by relevance

/frameworks/base/cmds/statsd/tests/metrics/
DOringDurationTracker_test.cpp42 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 …]
DMaxDurationTracker_test.cpp44 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/
DCountMetricProducer.cpp277 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()
DDurationMetricProducer.h56 const size_t matcherIndex, const MetricDimensionKey& eventKey,
61 void handleStartEvent(const MetricDimensionKey& eventKey, const ConditionKey& conditionKeys,
136 const MetricDimensionKey& eventKey) const;
DDurationMetricProducer.cpp162 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 …]
DGaugeMetricProducer.cpp460 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()
DEventMetricProducer.h44 const size_t matcherIndex, const MetricDimensionKey& eventKey,
DValueMetricProducer.cpp665 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()
DCountMetricProducer.h51 const size_t matcherIndex, const MetricDimensionKey& eventKey,
DGaugeMetricProducer.h93 const size_t matcherIndex, const MetricDimensionKey& eventKey,
DEventMetricProducer.cpp140 const size_t matcherIndex, const MetricDimensionKey& eventKey, in onMatchedLogEventInternalLocked() argument
DValueMetricProducer.h81 const size_t matcherIndex, const MetricDimensionKey& eventKey,
DMetricProducer.h378 const size_t matcherIndex, const MetricDimensionKey& eventKey,
/frameworks/base/cmds/statsd/src/metrics/duration_helper/
DDurationTracker.h61 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()
DMaxDurationTracker.h31 MaxDurationTracker(const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey,
DOringDurationTracker.h30 const MetricDimensionKey& eventKey, sp<ConditionWizard> wizard,
DMaxDurationTracker.cpp28 const MetricDimensionKey& eventKey, in MaxDurationTracker() argument
35 : DurationTracker(key, id, eventKey, wizard, conditionIndex, dimensionInCondition, nesting, in MaxDurationTracker()
DOringDurationTracker.cpp28 const ConfigKey& key, const int64_t& id, const MetricDimensionKey& eventKey, in OringDurationTracker() argument
33 : DurationTracker(key, id, eventKey, wizard, conditionIndex, dimensionInCondition, nesting, in OringDurationTracker()