Index: tools/perf/metrics/power.py |
diff --git a/tools/perf/metrics/power.py b/tools/perf/metrics/power.py |
index 0d10aa4c72fdf035acd8cdff973ec18175507d23..47d201bb149568800a4216feb75f651d13b4c20e 100644 |
--- a/tools/perf/metrics/power.py |
+++ b/tools/perf/metrics/power.py |
@@ -170,6 +170,7 @@ def _SubtractCpuStats(cpu_stats, start_cpu_stats): |
over the period recorded by the input. |
""" |
cpu_delta = {} |
+ total = 0 |
for process_type in cpu_stats: |
assert process_type in start_cpu_stats, 'Mismatching process types' |
# Skip any process_types that are empty. |
@@ -185,4 +186,6 @@ def _SubtractCpuStats(cpu_stats, start_cpu_stats): |
idle_wakeup_delta = (cpu_stats[process_type]['IdleWakeupCount'] - |
start_cpu_stats[process_type]['IdleWakeupCount']) |
cpu_delta[process_type] = idle_wakeup_delta.total_sum() |
+ total = total + cpu_delta[process_type] |
+ cpu_delta['Total'] = total |
return cpu_delta |