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

Unified Diff: tools/telemetry/telemetry/core/platform/__init__.py

Issue 350763005: [Telemetry] Power metric: subtract quiescent power draw from result (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 6 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
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 f183454f0fa04234b8cf2ccf31b0d09638851700..91c9747adba6e21dde1b1ad01499e04422795fa7 100644
--- a/tools/telemetry/telemetry/core/platform/__init__.py
+++ b/tools/telemetry/telemetry/core/platform/__init__.py
@@ -176,6 +176,13 @@ class Platform(object):
"""
return self._platform_backend.CanMonitorPower()
+ def CanMeasurePerApplicationPower(self):
+ """Returns True if the power monitor can measure power for the target
+ application in isolation. False if power measurement is for full system
+ energy consumption."""
+ return self._platform_backend.CanMeasurePerApplicationPower()
+
+
def StartMonitoringPower(self, browser):
"""Starts monitoring power utilization statistics.
@@ -199,11 +206,16 @@ class Platform(object):
# each sample.
'power_samples_mw': [mw0, mw1, ..., mwN],
- # 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.
+ # The full system 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,
+ # The target application's energy consumption during the sampling period
+ # in milliwatt hours. Should be returned iff
+ # CanMeasurePerApplicationPower() return true.
+ 'application_energy_consumption_mwh': mwh,
+
# A platform-specific dictionary of additional details about the
# utilization of individual hardware components.
component_utilization: {

Powered by Google App Engine
This is Rietveld 408576698