From fa14c11f05bbc1fce0a416f980e2bdaee3beb8fa Mon Sep 17 00:00:00 2001 From: Yangster-mac Date: Fri, 5 Jan 2018 12:00:37 -0800 Subject: [PATCH] Avoid overwriting bucket in Gauge metric producer as anomaly tracker needs past buckets. Test: statsd unit test passed. Change-Id: I3c76846da169b36c447c77db76b3deeda87e9e6e --- cmds/statsd/src/metrics/GaugeMetricProducer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp index e6f311b0a7fd6..1a4888c31ffff 100644 --- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp +++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp @@ -326,6 +326,7 @@ void GaugeMetricProducer::flushIfNeededLocked(const uint64_t& eventTimeNs) { } } + mCurrentSlicedBucketForAnomaly = std::make_shared(); mCurrentSlicedBucket = std::make_shared(); // Adjusts the bucket start time