diff options
author | Nathan Kulczak <nathankulczak@google.com> | 2023-05-23 07:23:11 +0000 |
---|---|---|
committer | Nathan Kulczak <nathankulczak@google.com> | 2023-05-23 07:23:11 +0000 |
commit | 75d5f503a007bcd8ff4618f5ff8d0e425b76ac56 (patch) | |
tree | 1366b28fc48fecd4feb681e4bfe00f12d8926ac1 | |
parent | 262976f7d81cc525768b30139f7b37fb8241daea (diff) |
vibrator: Fix vibrator latency suez stats reporting
Stop min latency from overwriting max latency
Bug: 266025768
Test: flash to device with frequent reporting and inspect logs
Change-Id: I05be98a10233521154eeefca5cc9119536b6ab06
Signed-off-by: Nathan Kulczak <nathankulczak@google.com>
-rw-r--r-- | vibrator/cs40l25/Stats.h | 2 | ||||
-rw-r--r-- | vibrator/cs40l26/Stats.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vibrator/cs40l25/Stats.h b/vibrator/cs40l25/Stats.h index 0181d21..f6a7a34 100644 --- a/vibrator/cs40l25/Stats.h +++ b/vibrator/cs40l25/Stats.h @@ -269,7 +269,7 @@ class StatsApi : public Vibrator::StatsApi, private StatsBase { mMinLatencies[mCurrentLatencyIndex] = latency; } if (latency > mMaxLatencies[mCurrentLatencyIndex]) { - mMinLatencies[mCurrentLatencyIndex] = latency; + mMaxLatencies[mCurrentLatencyIndex] = latency; } mLatencyTotals[mCurrentLatencyIndex] += latency; mLatencyCounts[mCurrentLatencyIndex]++; diff --git a/vibrator/cs40l26/Stats.h b/vibrator/cs40l26/Stats.h index b76e1b8..3948006 100644 --- a/vibrator/cs40l26/Stats.h +++ b/vibrator/cs40l26/Stats.h @@ -237,7 +237,7 @@ class StatsApi : public Vibrator::StatsApi, private StatsBase { mMinLatencies[mCurrentLatencyIndex] = latency; } if (latency > mMaxLatencies[mCurrentLatencyIndex]) { - mMinLatencies[mCurrentLatencyIndex] = latency; + mMaxLatencies[mCurrentLatencyIndex] = latency; } mLatencyTotals[mCurrentLatencyIndex] += latency; mLatencyCounts[mCurrentLatencyIndex]++; |