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

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

Issue 1453813002: backport code cleanup for power monitoring to m48 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years, 1 month 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/cros_power_monitor.py
diff --git a/tools/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py b/tools/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py
index 586a2985682718a4c1f7d7d9d32b7b5903556fb2..7f922bd56ffa8b2fa25ceaf53fd27cede8aba2d5 100644
--- a/tools/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py
+++ b/tools/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py
@@ -33,7 +33,7 @@ class CrosPowerMonitor(sysfs_power_monitor.SysfsPowerMonitor):
return super(CrosPowerMonitor, self).CanMonitorPower()
def StartMonitoringPower(self, browser):
- self._CheckStart()
+ super(CrosPowerMonitor, self).StartMonitoringPower(browser)
if self._IsOnBatteryPower():
sample = self._platform.RunCommand(['dump_power_status;', 'date', '+%s'])
self._initial_power, self._start_time = CrosPowerMonitor.SplitSample(
@@ -43,7 +43,7 @@ class CrosPowerMonitor(sysfs_power_monitor.SysfsPowerMonitor):
'Results may be incorrect.')
def StopMonitoringPower(self):
- self._CheckStop()
+ # Don't need to call self._CheckStop here; it's called by the superclass
cpu_stats = super(CrosPowerMonitor, self).StopMonitoringPower()
power_stats = {}
if self._IsOnBatteryPower():
« 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