Chromium Code Reviews| Index: tools/perf/metrics/power.py |
| diff --git a/tools/perf/metrics/power.py b/tools/perf/metrics/power.py |
| index c871b1dd9fc908fdb3a0cd8eb44908cf802c75cb..cc55d470d27491ac64d5a2a7bc46603fda5f2fd8 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 timeline_objects |
| from telemetry.value import scalar |
| @@ -178,7 +179,12 @@ 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 |
| + |
| + # Verify that the IdleWakeupCount field has been converted to a |
|
tonyg
2014/08/24 16:53:43
Let's just kill this comment. It answers "what" in
jeremy
2014/08/26 14:14:16
Done.
|
| + # TimlineData-based object. |
| + assert isinstance(cpu_stats[process_type]['IdleWakeupCount'], |
| + timeline_objects.IdleStatsData) |
| 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.IdleWakeupCount() |
| return cpu_delta |