Loading cmds/statsd/src/metrics/DurationMetricProducer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,13 @@ DurationMetricProducer::~DurationMetricProducer() { sp<AnomalyTracker> DurationMetricProducer::addAnomalyTracker( const Alert &alert, const sp<AlarmMonitor>& anomalyAlarmMonitor) { std::lock_guard<std::mutex> lock(mMutex); if (mAggregationType == DurationMetric_AggregationType_SUM) { if (alert.trigger_if_sum_gt() > alert.num_buckets() * mBucketSizeNs) { ALOGW("invalid alert for SUM: threshold (%f) > possible recordable value (%d x %lld)", alert.trigger_if_sum_gt(), alert.num_buckets(), (long long)mBucketSizeNs); return nullptr; } } sp<DurationAnomalyTracker> anomalyTracker = new DurationAnomalyTracker(alert, mConfigKey, anomalyAlarmMonitor); if (anomalyTracker != nullptr) { Loading Loading
cmds/statsd/src/metrics/DurationMetricProducer.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,13 @@ DurationMetricProducer::~DurationMetricProducer() { sp<AnomalyTracker> DurationMetricProducer::addAnomalyTracker( const Alert &alert, const sp<AlarmMonitor>& anomalyAlarmMonitor) { std::lock_guard<std::mutex> lock(mMutex); if (mAggregationType == DurationMetric_AggregationType_SUM) { if (alert.trigger_if_sum_gt() > alert.num_buckets() * mBucketSizeNs) { ALOGW("invalid alert for SUM: threshold (%f) > possible recordable value (%d x %lld)", alert.trigger_if_sum_gt(), alert.num_buckets(), (long long)mBucketSizeNs); return nullptr; } } sp<DurationAnomalyTracker> anomalyTracker = new DurationAnomalyTracker(alert, mConfigKey, anomalyAlarmMonitor); if (anomalyTracker != nullptr) { Loading