/frameworks/base/cmds/statsd/tests/metrics/ |
D | CountMetricProducer_test.cpp | 68 EXPECT_EQ(0UL, countProducer.mPastBuckets.size()); in TEST() 72 EXPECT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST() 73 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 74 countProducer.mPastBuckets.end()); in TEST() 75 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 87 EXPECT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST() 88 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 89 countProducer.mPastBuckets.end()); in TEST() 90 EXPECT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST() 91 const auto& bucketInfo2 = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1]; in TEST() [all …]
|
D | DurationMetricProducer_test.cpp | 67 EXPECT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST() 68 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 69 durationProducer.mPastBuckets.end()); in TEST() 70 const auto& buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 112 EXPECT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST() 118 EXPECT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST() 119 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 120 durationProducer.mPastBuckets.end()); in TEST() 121 const auto& buckets2 = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 160 EXPECT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST() [all …]
|
D | ValueMetricProducer_test.cpp | 93 EXPECT_EQ(0UL, valueProducer.mPastBuckets.size()); in TEST() 109 EXPECT_EQ(1UL, valueProducer.mPastBuckets.size()); in TEST() 110 EXPECT_EQ(1UL, valueProducer.mPastBuckets.begin()->second.size()); in TEST() 111 EXPECT_EQ(12, valueProducer.mPastBuckets.begin()->second.back().mValue); in TEST() 126 EXPECT_EQ(1UL, valueProducer.mPastBuckets.size()); in TEST() 127 EXPECT_EQ(2UL, valueProducer.mPastBuckets.begin()->second.size()); in TEST() 128 EXPECT_EQ(13, valueProducer.mPastBuckets.begin()->second.back().mValue); in TEST() 170 EXPECT_EQ(0UL, valueProducer.mPastBuckets.size()); in TEST() 185 EXPECT_EQ(1UL, valueProducer.mPastBuckets.size()); in TEST() 186 EXPECT_EQ(1UL, valueProducer.mPastBuckets.begin()->second.size()); in TEST() [all …]
|
D | GaugeMetricProducer_test.cpp | 89 EXPECT_EQ(0UL, gaugeProducer.mPastBuckets.size()); in TEST() 108 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST() 109 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST() 110 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST() 120 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST() 121 EXPECT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST() 122 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST() 162 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST() 175 EXPECT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST() 188 EXPECT_EQ(2UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST() [all …]
|
/frameworks/base/cmds/statsd/src/anomaly/ |
D | AnomalyTracker.cpp | 54 mPastBuckets.clear(); in resetStorage() 56 mPastBuckets.resize(mNumOfPastBuckets); in resetStorage() 87 subtractBucketFromSum(mPastBuckets[idx]); in advanceMostRecentBucketTo() 88 mPastBuckets[idx] = nullptr; // release (but not clear) the old bucket. in advanceMostRecentBucketTo() 103 if (bucketNum <= mMostRecentBucketNum && (mPastBuckets[bucketIndex] != nullptr)) { in addPastBucket() 105 std::shared_ptr<DimToValMap>& bucket = mPastBuckets[bucketIndex]; in addPastBucket() 133 subtractBucketFromSum(mPastBuckets[index(bucketNum)]); in addPastBucket() 138 mPastBuckets[index(bucketNum)] = bucket; in addPastBucket() 182 const auto& bucket = mPastBuckets[index(bucketNum)]; in getPastBucketValue()
|
D | AnomalyTracker.h | 138 std::vector<shared_ptr<DimToValMap>> mPastBuckets; variable
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | CountMetricProducer.cpp | 138 mPastBuckets.clear(); in clearPastBucketsLocked() 150 if (mPastBuckets.empty()) { in onDumpReportLocked() 176 for (const auto& counter : mPastBuckets) { in onDumpReportLocked() 230 mPastBuckets.clear(); in onDumpReportLocked() 235 mPastBuckets.clear(); in dropDataLocked() 330 auto& bucketList = mPastBuckets[counter.first]; in flushCurrentBucketLocked() 371 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | ValueMetricProducer.cpp | 161 mPastBuckets.clear(); in dropDataLocked() 166 mPastBuckets.clear(); in clearPastBucketsLocked() 180 if (mPastBuckets.empty() && mSkippedBuckets.empty()) { in onDumpReportLocked() 215 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 269 mPastBuckets.clear(); in onDumpReportLocked() 478 auto& bucketList = mPastBuckets[slice.first]; in flushCurrentBucketLocked() 524 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | GaugeMetricProducer.cpp | 175 mPastBuckets.clear(); in clearPastBucketsLocked() 190 if (mPastBuckets.empty()) { in onDumpReportLocked() 227 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 310 mPastBuckets.clear(); in onDumpReportLocked() 479 mPastBuckets.clear(); in dropDataLocked() 520 auto& bucketList = mPastBuckets[slice.first]; in flushCurrentBucketLocked() 547 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | DurationMetricProducer.cpp | 448 mPastBuckets.clear(); in dropDataLocked() 453 mPastBuckets.clear(); in clearPastBucketsLocked() 465 if (mPastBuckets.empty()) { in onDumpReportLocked() 493 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 546 mPastBuckets.clear(); in onDumpReportLocked() 559 if (it->second->flushIfNeeded(eventTimeNs, &mPastBuckets)) { in flushIfNeededLocked() 583 if (it->second->flushCurrentBucket(eventTimeNs, &mPastBuckets)) { in flushCurrentBucketLocked() 801 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | CountMetricProducer.h | 84 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets; variable
|
D | DurationMetricProducer.h | 119 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets; variable
|
D | GaugeMetricProducer.h | 132 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets; variable
|
D | ValueMetricProducer.h | 153 std::unordered_map<MetricDimensionKey, std::vector<ValueBucket>> mPastBuckets; variable
|