Index: tools/perf/metrics/power.py |
diff --git a/tools/perf/metrics/power.py b/tools/perf/metrics/power.py |
index c871b1dd9fc908fdb3a0cd8eb44908cf802c75cb..0d10aa4c72fdf035acd8cdff973ec18175507d23 100644 |
--- a/tools/perf/metrics/power.py |
+++ b/tools/perf/metrics/power.py |
@@ -5,6 +5,7 @@ |
import time |
from metrics import Metric |
+from telemetry.core.platform import process_statistic_timeline_data |
from telemetry.value import scalar |
@@ -178,7 +179,10 @@ def _SubtractCpuStats(cpu_stats, start_cpu_stats): |
if (('IdleWakeupCount' not in cpu_stats[process_type]) or |
('IdleWakeupCount' not in start_cpu_stats[process_type])): |
continue |
+ |
+ assert isinstance(cpu_stats[process_type]['IdleWakeupCount'], |
+ process_statistic_timeline_data.IdleWakeupTimelineData) |
idle_wakeup_delta = (cpu_stats[process_type]['IdleWakeupCount'] - |
start_cpu_stats[process_type]['IdleWakeupCount']) |
- cpu_delta[process_type] = idle_wakeup_delta |
+ cpu_delta[process_type] = idle_wakeup_delta.total_sum() |
return cpu_delta |