Don't just clear mPastBuckets when onDumpReport is called.

This needs to be done properly. Left a TODO.

Test: statsd_test
Change-Id: I8537f0a870ab82039e0822c69096784403ee1651
This commit is contained in:
Yao Chen
2017-11-18 14:14:38 -08:00
parent fe945d189a
commit 30b6a20c99

View File

@@ -222,10 +222,8 @@ std::unique_ptr<std::vector<uint8_t>> DurationMetricProducer::onDumpReport() {
(long long)mCurrentBucketStartTimeNs);
std::unique_ptr<std::vector<uint8_t>> buffer = serializeProto();
startNewProtoOutputStream(endTime);
mPastBuckets.clear();
// TODO: Properly clear the old buckets.
return buffer;
}