Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py

Issue 1547423002: Fix webview perf test crash in sysfs_power_monitor.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py b/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
index 2a9bd6048acfeb96412a6d99312e3af2dea5d1ad..22b5bf60b763a2a826faa1d1003a7363a586e9be 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/sysfs_power_monitor.py
@@ -180,7 +180,7 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
for cpu in initial:
current_cpu = {}
total = 0
- if not initial[cpu] or not final[cpu]:
+ if cpu not in final or not initial[cpu] or not final[cpu]:
cpu_stats[cpu] = collections.defaultdict(int)
continue
for state in initial[cpu]:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698