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

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

Issue 605763002: Add warning log when sysfs_power_monitor fail to read power frequency. (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 | no next file » | 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..43326116038670848d1e94f626c82513fe31dc8c 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
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import collections
+import logging
import os
import re
@@ -106,7 +107,10 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
CPU_PATH, cpu, 'cpufreq/stats/time_in_state')
try:
stats[cpu] = self._platform.GetFileContents(cpu_freq_path)
- except Exception:
+ except Exception as e:
+ logging.warning(
+ 'Cannot read cpu frequency times in %s due to error: %s' %
+ (cpu_freq_path, e.message))
stats[cpu] = None
return stats
« 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