Fix testValueMetric flake
Don't skip buckets with MULTIPLE_SKIPPED_BUCKETS reason for pushed metric that is not diffed. Fixes: 156690892 Test: atest --rerun-until-failure=100 CtsStatsdHostTestCases: android.cts.statsd.metric.ValueMetricsTests#testValueMetriccts.statsd.metric.ValueMetricsTests#testValueMetric Change-Id: Ic14198d38ab63d99700a4df9e9e7ae04181f5139
This commit is contained in:
@@ -959,7 +959,10 @@ void ValueMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs,
|
||||
int64_t fullBucketEndTimeNs = getCurrentBucketEndTimeNs();
|
||||
int64_t bucketEndTime = fullBucketEndTimeNs;
|
||||
int64_t numBucketsForward = calcBucketsForwardCount(eventTimeNs);
|
||||
if (numBucketsForward > 1) {
|
||||
|
||||
// Skip buckets if this is a pulled metric or a pushed metric that is diffed.
|
||||
if (numBucketsForward > 1 && (mIsPulled || mUseDiff)) {
|
||||
|
||||
VLOG("Skipping forward %lld buckets", (long long)numBucketsForward);
|
||||
StatsdStats::getInstance().noteSkippedForwardBuckets(mMetricId);
|
||||
// Something went wrong. Maybe the device was sleeping for a long time. It is better
|
||||
|
||||
Reference in New Issue
Block a user