Loading cmds/statsd/src/metrics/GaugeMetricProducer.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -324,6 +324,10 @@ void GaugeMetricProducer::pullLocked(const int64_t timestampNs) { triggerPuller = true; triggerPuller = true; break; break; } } case GaugeMetric::CONDITION_CHANGE_TO_TRUE: { triggerPuller = mCondition; break; } default: default: break; break; } } Loading @@ -348,7 +352,7 @@ void GaugeMetricProducer::onConditionChangedLocked(const bool conditionMet, flushIfNeededLocked(eventTimeNs); flushIfNeededLocked(eventTimeNs); mCondition = conditionMet; mCondition = conditionMet; if (mPullTagId != -1 && mCondition) { if (mPullTagId != -1) { pullLocked(eventTimeNs); pullLocked(eventTimeNs); } // else: Push mode. No need to proactively pull the gauge data. } // else: Push mode. No need to proactively pull the gauge data. } } Loading cmds/statsd/src/statsd_config.proto +1 −0 Original line number Original line Diff line number Diff line Loading @@ -234,6 +234,7 @@ message GaugeMetric { enum SamplingType { enum SamplingType { RANDOM_ONE_SAMPLE = 1; RANDOM_ONE_SAMPLE = 1; ALL_CONDITION_CHANGES = 2; ALL_CONDITION_CHANGES = 2; CONDITION_CHANGE_TO_TRUE = 3; } } optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ; optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ; Loading Loading
cmds/statsd/src/metrics/GaugeMetricProducer.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -324,6 +324,10 @@ void GaugeMetricProducer::pullLocked(const int64_t timestampNs) { triggerPuller = true; triggerPuller = true; break; break; } } case GaugeMetric::CONDITION_CHANGE_TO_TRUE: { triggerPuller = mCondition; break; } default: default: break; break; } } Loading @@ -348,7 +352,7 @@ void GaugeMetricProducer::onConditionChangedLocked(const bool conditionMet, flushIfNeededLocked(eventTimeNs); flushIfNeededLocked(eventTimeNs); mCondition = conditionMet; mCondition = conditionMet; if (mPullTagId != -1 && mCondition) { if (mPullTagId != -1) { pullLocked(eventTimeNs); pullLocked(eventTimeNs); } // else: Push mode. No need to proactively pull the gauge data. } // else: Push mode. No need to proactively pull the gauge data. } } Loading
cmds/statsd/src/statsd_config.proto +1 −0 Original line number Original line Diff line number Diff line Loading @@ -234,6 +234,7 @@ message GaugeMetric { enum SamplingType { enum SamplingType { RANDOM_ONE_SAMPLE = 1; RANDOM_ONE_SAMPLE = 1; ALL_CONDITION_CHANGES = 2; ALL_CONDITION_CHANGES = 2; CONDITION_CHANGE_TO_TRUE = 3; } } optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ; optional SamplingType sampling_type = 9 [default = RANDOM_ONE_SAMPLE] ; Loading