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

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

Issue 610483002: Handle the case freq state data read from file is empty for sysfs_power_montior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py b/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py
index d1dff5594a2a1568ac0b7181750b295168fd4cdd..f273adb6cc41710e7f22c275d38c39d5bec5a4d3 100644
--- a/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor.py
@@ -158,7 +158,7 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
for cpu in initial:
current_cpu = {}
total = 0
- if initial[cpu] is None or final[cpu] is None:
+ if 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 | tools/telemetry/telemetry/core/platform/power_monitor/sysfs_power_monitor_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698