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

Unified Diff: tools/perf/measurements/energy.py

Issue 1092393002: Telemetry: Quiescent power benchmarks for Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@safari-backend
Patch Set: Fix missing idle_wakeups_renderer Created 5 years, 8 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 | « tools/perf/benchmarks/energy.py ('k') | tools/perf/metrics/cpu.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/energy.py
diff --git a/tools/perf/measurements/energy.py b/tools/perf/measurements/energy.py
new file mode 100644
index 0000000000000000000000000000000000000000..ed3d4fbad8e8b096e5bbcbbfed4e1f11de761030
--- /dev/null
+++ b/tools/perf/measurements/energy.py
@@ -0,0 +1,25 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import time
+
+from metrics import cpu
+from metrics import power
+from telemetry.page import page_test
+
+
+class Energy(page_test.PageTest):
sullivan 2015/04/21 15:56:53 It's pretty confusing to have both "Power" and "En
Andre 2015/04/22 00:46:54 Done, merged into power.py.
+ """Measures energy usage and idle wakeups after the page is loaded."""
+
+ # Amount of time to measure, in seconds.
+ SAMPLE_TIME = 30
+
+ def ValidateAndMeasurePage(self, page, tab, results):
+ metric = power.PowerMetric(tab.browser.platform)
+ metric.Start(page, tab)
+
+ time.sleep(Energy.SAMPLE_TIME)
+
+ metric.Stop(page, tab)
+ metric.AddResults(tab, results)
« no previous file with comments | « tools/perf/benchmarks/energy.py ('k') | tools/perf/metrics/cpu.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698