/packages/modules/StatsD/statsd/tests/metrics/ |
D | CountMetricProducer_test.cpp | 112 ASSERT_EQ(0UL, countProducer.mPastBuckets.size()); in TEST() 116 ASSERT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST() 117 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 118 countProducer.mPastBuckets.end()); in TEST() 119 const auto& buckets = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 132 ASSERT_EQ(1UL, countProducer.mPastBuckets.size()); in TEST() 133 EXPECT_TRUE(countProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 134 countProducer.mPastBuckets.end()); in TEST() 135 ASSERT_EQ(2UL, countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST() 136 const auto& bucketInfo2 = countProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][1]; in TEST() [all …]
|
D | DurationMetricProducer_test.cpp | 111 ASSERT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST() 112 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 113 durationProducer.mPastBuckets.end()); in TEST() 114 const auto& buckets = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 159 ASSERT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST() 165 ASSERT_EQ(1UL, durationProducer.mPastBuckets.size()); in TEST() 166 EXPECT_TRUE(durationProducer.mPastBuckets.find(DEFAULT_METRIC_DIMENSION_KEY) != in TEST() 167 durationProducer.mPastBuckets.end()); in TEST() 168 const auto& buckets2 = durationProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY]; in TEST() 209 ASSERT_EQ(0UL, durationProducer.mPastBuckets.size()); in TEST() [all …]
|
D | GaugeMetricProducer_test.cpp | 160 ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST() 161 EXPECT_EQ(3, gaugeProducer.mPastBuckets.begin() in TEST() 178 ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST() 179 ASSERT_EQ(2UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST() 180 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST() 190 ASSERT_EQ(1UL, gaugeProducer.mPastBuckets.size()); in TEST() 191 ASSERT_EQ(3UL, gaugeProducer.mPastBuckets.begin()->second.size()); in TEST() 192 it = gaugeProducer.mPastBuckets.begin()->second.back().mGaugeAtoms.front().mFields->begin(); in TEST() 242 ASSERT_EQ(1UL, gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY].size()); in TEST_P() 244 gaugeProducer.mPastBuckets[DEFAULT_METRIC_DIMENSION_KEY][0].mBucketStartNs); in TEST_P() [all …]
|
D | ValueMetricProducer_test.cpp | 61 const std::unordered_map<MetricDimensionKey, std::vector<PastValueBucket>>& mPastBuckets, in assertPastBucketValuesSingleKey() argument 76 ASSERT_EQ(0, mPastBuckets.size()); in assertPastBucketValuesSingleKey() 80 ASSERT_EQ(1, mPastBuckets.size()); in assertPastBucketValuesSingleKey() 81 ASSERT_EQ(expectedValues.size(), mPastBuckets.begin()->second.size()); in assertPastBucketValuesSingleKey() 83 const vector<PastValueBucket>& buckets = mPastBuckets.begin()->second; in assertPastBucketValuesSingleKey() 308 ASSERT_EQ(1UL, valueProducer->mPastBuckets.size()); in TEST() 309 EXPECT_EQ(8, valueProducer->mPastBuckets.begin()->second[0].values[0].long_value); in TEST() 310 EXPECT_EQ(bucketSizeNs, valueProducer->mPastBuckets.begin()->second[0].mConditionTrueNs); in TEST() 324 ASSERT_EQ(1UL, valueProducer->mPastBuckets.size()); in TEST() 325 ASSERT_EQ(2UL, valueProducer->mPastBuckets.begin()->second.size()); in TEST() [all …]
|
/packages/modules/StatsD/statsd/src/anomaly/ |
D | AnomalyTracker.cpp | 53 mPastBuckets.clear(); in resetStorage() 55 mPastBuckets.resize(mNumOfPastBuckets); in resetStorage() 86 subtractBucketFromSum(mPastBuckets[idx]); in advanceMostRecentBucketTo() 87 mPastBuckets[idx] = nullptr; // release (but not clear) the old bucket. in advanceMostRecentBucketTo() 102 if (bucketNum <= mMostRecentBucketNum && (mPastBuckets[bucketIndex] != nullptr)) { in addPastBucket() 104 std::shared_ptr<DimToValMap>& bucket = mPastBuckets[bucketIndex]; in addPastBucket() 132 subtractBucketFromSum(mPastBuckets[index(bucketNum)]); in addPastBucket() 137 mPastBuckets[index(bucketNum)] = bucket; in addPastBucket() 181 const auto& bucket = mPastBuckets[index(bucketNum)]; in getPastBucketValue()
|
D | AnomalyTracker.h | 173 std::vector<shared_ptr<DimToValMap>> mPastBuckets; variable
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | CountMetricProducer.cpp | 203 mPastBuckets.clear(); in clearPastBucketsLocked() 221 if (mPastBuckets.empty()) { in onDumpReportLocked() 239 for (const auto& counter : mPastBuckets) { in onDumpReportLocked() 288 mPastBuckets.clear(); in onDumpReportLocked() 295 mPastBuckets.clear(); in dropDataLocked() 414 auto& bucketList = mPastBuckets[counter.first]; in flushCurrentBucketLocked() 457 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | GaugeMetricProducer.cpp | 236 mPastBuckets.clear(); in clearPastBucketsLocked() 256 if (mPastBuckets.empty() && mSkippedBuckets.empty()) { in onDumpReportLocked() 293 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 351 mPastBuckets.clear(); in onDumpReportLocked() 588 mPastBuckets.clear(); in dropDataLocked() 630 auto& bucketList = mPastBuckets[slice.first]; in flushCurrentBucketLocked() 666 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | DurationMetricProducer.cpp | 480 mPastBuckets.clear(); in dropDataLocked() 485 mPastBuckets.clear(); in clearPastBucketsLocked() 502 if (mPastBuckets.empty()) { in onDumpReportLocked() 523 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 571 mPastBuckets.clear(); in onDumpReportLocked() 593 if (whatIt->second->flushCurrentBucket(eventTimeNs, mUploadThreshold, &mPastBuckets)) { in flushCurrentBucketLocked() 784 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | ValueMetricProducer.cpp | 290 mPastBuckets.clear(); in clearPastBucketsLocked() 322 if (mPastBuckets.empty() && mSkippedBuckets.empty()) { in onDumpReportLocked() 357 for (const auto& pair : mPastBuckets) { in onDumpReportLocked() 434 mPastBuckets.clear(); in onDumpReportLocked() 1103 auto& bucketList = mPastBuckets[metricDimensionKey]; in flushCurrentBucketLocked() 1278 for (const auto& pair : mPastBuckets) { in byteSizeLocked()
|
D | CountMetricProducer.h | 116 std::unordered_map<MetricDimensionKey, std::vector<CountBucket>> mPastBuckets; variable
|
D | DurationMetricProducer.h | 171 std::unordered_map<MetricDimensionKey, std::vector<DurationBucket>> mPastBuckets; variable
|
D | GaugeMetricProducer.h | 179 std::unordered_map<MetricDimensionKey, std::vector<GaugeBucket>> mPastBuckets; variable
|
D | ValueMetricProducer.h | 252 std::unordered_map<MetricDimensionKey, std::vector<PastValueBucket>> mPastBuckets; variable
|