Chromium Code Reviews| Index: tools/telemetry/telemetry/core/platform/__init__.py |
| diff --git a/tools/telemetry/telemetry/core/platform/__init__.py b/tools/telemetry/telemetry/core/platform/__init__.py |
| index 76d6401017c9af659e9da150a3f0a1e837657999..5f41262ed4e5f189652a4b5a273211a98fd83e46 100644 |
| --- a/tools/telemetry/telemetry/core/platform/__init__.py |
| +++ b/tools/telemetry/telemetry/core/platform/__init__.py |
| @@ -167,47 +167,22 @@ class Platform(object): |
| for t in self._platform_backend.StopVideoCapture(): |
| yield t |
| - def CanMonitorPowerSync(self): |
| - """Returns True iff power can be monitored synchronously via |
| - MonitorPowerSync(). |
| + def CanMonitorPower(self): |
| + """Returns True iff power can be monitored asynchronously via |
| + StartMonitoringPower() and StopMonitoringPower(). |
| """ |
| - return self._platform_backend.CanMonitorPowerSync() |
| - |
| - def MonitorPowerSync(self, duration_ms): |
| - """Synchronously monitors power for |duration_ms|. |
| + return self._platform_backend.CanMonitorPower() |
| - Returns: |
| - A dict of power utilization statistics containing: { |
| - # The instantaneous power (voltage * current) reading in milliwatts at |
| - # each sample. |
| - 'power_samples_mw': [mw0, mw1, ..., mwN], |
| + def StartMonitoringPower(self, browser): |
| + """Starts monitoring power utilization statistics. |
| - # The total energy consumption during the sampling period in milliwatt |
| - # hours. May be estimated by integrating power samples or may be exact |
| - # on supported hardware. |
| - 'energy_consumption_mwh': mwh, |
| - |
| - # A platform-specific dictionary of additional details about the |
| - # utilization of individual hardware components. |
| - hw_component_utilization: { |
| - ... |
| - } |
| - } |
| - """ |
| - return self._platform_backend.MonitorPowerSync(duration_ms) |
| - |
| - def CanMonitorPowerAsync(self): |
| - """Returns True iff power can be monitored asynchronously via |
| - StartMonitoringPowerAsync() and StopMonitoringPowerAsync(). |
| + Args: |
| + browser: The browser to monitor. |
| """ |
| - return self._platform_backend.CanMonitorPowerAsync() |
| - |
| - def StartMonitoringPowerAsync(self): |
| - """Starts monitoring power utilization statistics.""" |
| - assert self._platform_backend.CanMonitorPowerAsync() |
| - self._platform_backend.StartMonitoringPowerAsync() |
| + assert self._platform_backend.CanMonitorPower() |
| + self._platform_backend.StartMonitoringPower(browser) |
| - def StopMonitoringPowerAsync(self): |
| + def StopMonitoringPower(self): |
| """Stops monitoring power utilization and returns collects stats |
|
jeremy
2014/04/03 11:16:30
While you're in here :)
s/returns collects/returns
qsr
2014/04/03 12:02:43
Done.
|
| Returns: |
| @@ -233,4 +208,4 @@ class Platform(object): |
| } |
| } |
| """ |
| - return self._platform_backend.StopMonitoringPowerAsync() |
| + return self._platform_backend.StopMonitoringPower() |