Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 613a7e2a authored by Yangster's avatar Yangster
Browse files

Should not use the absolute value when the value does not change.

Test: statsd test

BUG: b/79265262
Change-Id: Ic654e1a07a505ec0e073a41fb41bcd38a29b125e
parent 8ea760c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ void ValueMetricProducer::onMatchedLogEventInternalLocked(
            // If not, there was a reset event. We take the absolute value as
            // diff in this case.
            if (interval.startUpdated) {
                if (value > interval.start) {
                if (value >= interval.start) {
                    interval.sum += (value - interval.start);
                } else {
                    interval.sum += value;