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

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

Issue 635313002: [Telemetry] Fix C-State stat reading for Note 3 and S5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: More descriptive test name Created 6 years, 2 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 421f5830e26922c260ec16d4511cfeb7b92ff28b..5c708802a844aedac11e725c1be362e8ef7ce8cd 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
@@ -89,10 +89,12 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
stats = {}
for cpu in self._cpus:
cpu_state_path = os.path.join(CPU_PATH, cpu, 'cpuidle/state*')
- stats[cpu] = self._platform.RunCommand(
- 'cat %s %s %s; date +%%s' % (os.path.join(cpu_state_path, 'name'),
- os.path.join(cpu_state_path, 'time'),
- os.path.join(cpu_state_path, 'latency')))
+ output = self._platform.RunCommand(
+ 'cat %s %s %s; date +%%s' % (
+ os.path.join(cpu_state_path, 'name'),
+ os.path.join(cpu_state_path, 'time'),
+ os.path.join(cpu_state_path, 'latency')))
+ stats[cpu] = re.sub('\n\n+', '\n', output)
return stats
def GetCpuFreq(self):
« 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