Home
last modified time | relevance | path

Searched refs:mPastBuckets (Results 1 – 14 of 14) sorted by relevance

/frameworks/base/cmds/statsd/tests/metrics/
DCountMetricProducer_test.cpp80 EXPECT_EQ(0UL, countProducer.mPastBuckets.size()); in TEST()
84 EXPECT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST()
85 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST()
86 countProducer.mPastBuckets.end()); in TEST()
87 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST()
99 EXPECT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST()
100 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST()
101 countProducer.mPastBuckets.end()); in TEST()
102 EXPECT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST()
103 const auto& bucketInfo2 = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1]; in TEST()
[all …]
DDurationMetricProducer_test.cpp83 EXPECT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST()
84 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST()
85 durationProducer.mPastBuckets.end()); in TEST()
86 const auto& buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST()
128 EXPECT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST()
134 EXPECT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST()
135 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST()
136 durationProducer.mPastBuckets.end()); in TEST()
137 const auto& buckets2 = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST()
175 EXPECT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST()
[all …]
DValueMetricProducer_test.cpp57 const std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>>& mPastBuckets, in assertPastBucketValuesSingleKey() argument
64 ASSERT_EQ(0, mPastBuckets.size()); in assertPastBucketValuesSingleKey()
68 ASSERT_EQ(1, mPastBuckets.size()); in assertPastBucketValuesSingleKey()
69 ASSERT_EQ(expectedValues.size(), mPastBuckets.begin()->second.size()); in assertPastBucketValuesSingleKey()
71 auto buckets = mPastBuckets.begin()->second; in assertPastBucketValuesSingleKey()
246 EXPECT_EQ(1UL, valueProducer->mPastBuckets.size()); in TEST()
247 EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value); in TEST()
248 EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs); in TEST()
265 EXPECT_EQ(1UL, valueProducer->mPastBuckets.size()); in TEST()
266 EXPECT_EQ(2UL, valueProducer->mPastBuckets.begin()->second.size()); in TEST()
[all …]
DGaugeMetricProducer_test.cpp147 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST()
148 EXPECT_EQ(3, gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms in TEST()
167 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST()
168 EXPECT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST()
169 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST()
179 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST()
180 EXPECT_EQ(3UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST()
181 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST()
228 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST()
241 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST()
[all …]
/frameworks/base/cmds/statsd/src/anomaly/
DAnomalyTracker.cpp55 mPastBuckets.clear(); in resetStorage()
57 mPastBuckets.resize(mNumOfPastBuckets); in resetStorage()
88 subtractBucketFromSum(mPastBuckets[idx]); in advanceMostRecentBucketTo()
89 mPastBuckets[idx] = nullptr; // release (but not clear) the old bucket. in advanceMostRecentBucketTo()
104 if (bucketNum <= mMostRecentBucketNum && (mPastBuckets[bucketIndex] != nullptr)) { in addPastBucket()
106 std::shared_ptr<DimToValMap>& bucket = mPastBuckets[bucketIndex]; in addPastBucket()
134 subtractBucketFromSum(mPastBuckets[index(bucketNum)]); in addPastBucket()
139 mPastBuckets[index(bucketNum)] = bucket; in addPastBucket()
183 const auto& bucket = mPastBuckets[index(bucketNum)]; in getPastBucketValue()
DAnomalyTracker.h138 std::vector<shared_ptr<DimToValMap>> mPastBuckets; variable
/frameworks/base/cmds/statsd/src/metrics/
DCountMetricProducer.cpp142 mPastBuckets.clear(); in clearPastBucketsLocked()
160 if (mPastBuckets.empty()) { in onDumpReportLocked()
185 for (const auto& counter : mPastBuckets) { in onDumpReportLocked()
240 mPastBuckets.clear(); in onDumpReportLocked()
247 mPastBuckets.clear(); in dropDataLocked()
344 auto& bucketList = mPastBuckets[counter.first]; in flushCurrentBucketLocked()
387 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
DGaugeMetricProducer.cpp175 mPastBuckets.clear(); in clearPastBucketsLocked()
195 if (mPastBuckets.empty()) { in onDumpReportLocked()
230 for (const auto& pair : mPastBuckets) { in onDumpReportLocked()
303 mPastBuckets.clear(); in onDumpReportLocked()
531 mPastBuckets.clear(); in dropDataLocked()
573 auto& bucketList = mPastBuckets[slice.first]; in flushCurrentBucketLocked()
602 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
DDurationMetricProducer.cpp492 mPastBuckets.clear(); in dropDataLocked()
497 mPastBuckets.clear(); in clearPastBucketsLocked()
514 if (mPastBuckets.empty()) { in onDumpReportLocked()
541 for (const auto& pair : mPastBuckets) { in onDumpReportLocked()
595 mPastBuckets.clear(); in onDumpReportLocked()
618 if (it->second->flushCurrentBucket(eventTimeNs, &mPastBuckets)) { in flushCurrentBucketLocked()
843 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
DValueMetricProducer.cpp196 mPastBuckets.clear(); in clearPastBucketsLocked()
228 if (mPastBuckets.empty() && mSkippedBuckets.empty()) { in onDumpReportLocked()
261 for (const auto& pair : mPastBuckets) { in onDumpReportLocked()
339 mPastBuckets.clear(); in onDumpReportLocked()
872 auto& bucketList = mPastBuckets[slice.first]; in flushCurrentBucketLocked()
1004 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
DCountMetricProducer.h85 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets; variable
DDurationMetricProducer.h127 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets; variable
DGaugeMetricProducer.h150 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets; variable
DValueMetricProducer.h173 std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>> mPastBuckets; variable