commit | e077f57ce572f964d2b2c13f19d3af05d2897226 | [log] [tgz] |
---|---|---|
author | Chenjie Yu <cjyu@google.com> | Fri Nov 02 11:51:37 2018 -0700 |
committer | Chenjie Yu <cjyu@google.com> | Fri Nov 02 11:51:37 2018 -0700 |
tree | 52731e120034b29b3274d5e3de88afd80150f177 | |
parent | d462993ec85d290a568d499e72429cfeafe47b5e [diff] [blame] |
remove unnecessary pulls in gaugemetric GaugeMetric need only pull on first bucket and partial bucket if it is random_one_sample type Test: unit test Change-Id: I85cfbc2a14829245ce34ab801c553a3097e2e4b8
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp index f5a16e9..06ec499 100644 --- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp +++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
@@ -140,7 +140,7 @@ // Adjust start for partial bucket mCurrentBucketStartTimeNs = startTimeNs; - if (mIsPulled) { + if (mIsPulled && mSamplingType == GaugeMetric::RANDOM_ONE_SAMPLE) { pullAndMatchEventsLocked(startTimeNs); }