summaryrefslogtreecommitdiffstats
path: root/tools/perf/benchmarks/indexeddb_perf.py
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-02 10:11:29 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-02 10:11:29 +0000
commit971cf77e78f6ebc7296e65c9d15087e948818ee3 (patch)
tree7e7bd10c324c84d55ad3073926c3eaad7febf8b2 /tools/perf/benchmarks/indexeddb_perf.py
parent1d900147bc818c06f4d1ad236e2109f43028c453 (diff)
downloadchromium_src-971cf77e78f6ebc7296e65c9d15087e948818ee3.zip
chromium_src-971cf77e78f6ebc7296e65c9d15087e948818ee3.tar.gz
chromium_src-971cf77e78f6ebc7296e65c9d15087e948818ee3.tar.bz2
[Telemetry] Power metric: subtract quiescent power draw from result
Some power measurement backends can only measure global power draw for the whole system and not per-process. Try to get a more exact power measurement by measuring the power draw without the browser running and then subtracting that number from the measurement in the test to try to get a more exact number for how much additional power is being used by the test case. BUG=339180 Review URL: https://codereview.chromium.org/350763005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf/benchmarks/indexeddb_perf.py')
-rw-r--r--tools/perf/benchmarks/indexeddb_perf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/benchmarks/indexeddb_perf.py b/tools/perf/benchmarks/indexeddb_perf.py
index cad569b..ec93f9a 100644
--- a/tools/perf/benchmarks/indexeddb_perf.py
+++ b/tools/perf/benchmarks/indexeddb_perf.py
@@ -38,9 +38,13 @@ class _IndexedDbMeasurement(page_measurement.PageMeasurement):
def __init__(self, *args, **kwargs):
super(_IndexedDbMeasurement, self).__init__(*args, **kwargs)
self._memory_metric = None
- self._power_metric = power.PowerMetric()
+ self._power_metric = None
self._v8_object_stats_metric = None
+ def WillStartBrowser(self, browser):
+ """Initialize metrics once right before the browser has been launched."""
+ self._power_metric = power.PowerMetric(browser)
+
def DidStartBrowser(self, browser):
"""Initialize metrics once right after the browser has been launched."""
self._memory_metric = memory.MemoryMetric(browser)