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

Unified Diff: tools/perf/benchmarks/power.py

Issue 2744273003: [Telemetry] Add benchmark that doesn't launch chrome and collects platform data. (Closed)
Patch Set: fix archive_data_path from None to empty string Created 3 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/benchmark.csv ('k') | tools/perf/page_sets/idle_platform.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/power.py
diff --git a/tools/perf/benchmarks/power.py b/tools/perf/benchmarks/power.py
index 358c08e5ec1f19a808d3f480840c3535d23a3056..7cc17e17125a20f6ebc5b0d377f90d70f38c8217 100644
--- a/tools/perf/benchmarks/power.py
+++ b/tools/perf/benchmarks/power.py
@@ -7,6 +7,8 @@ from core import perf_benchmark
from measurements import power
import page_sets
from telemetry import benchmark
+from telemetry.timeline import chrome_trace_category_filter
+from telemetry.web_perf import timeline_based_measurement
@benchmark.Enabled('android')
@@ -147,6 +149,7 @@ class PowerScrollingTrivialPage(perf_benchmark.PerfBenchmark):
def Name(cls):
return 'power.trivial_pages'
+
@benchmark.Enabled('mac')
class PowerSteadyStatePages(perf_benchmark.PerfBenchmark):
"""Measure power consumption for real web sites in steady state (no user
@@ -157,3 +160,42 @@ class PowerSteadyStatePages(perf_benchmark.PerfBenchmark):
@classmethod
def Name(cls):
return 'power.steady_state'
+
+
+class IdlePlatformBenchmark(perf_benchmark.PerfBenchmark):
+ """Idle platform benchmark.
+
+ This benchmark just starts up tracing agents and lets the platform sit idle.
+ Our power benchmarks are prone to noise caused by other things running on the
+ system. This benchmark is intended to help find the sources of noise.
+ """
+ def CreateTimelineBasedMeasurementOptions(self):
+ options = timeline_based_measurement.Options(
+ chrome_trace_category_filter.ChromeTraceCategoryFilter())
+ # Enable CPU tracing when the bug is resolved.
+ # https://github.com/catapult-project/catapult/issues/3463
+ options.config.enable_battor_trace = True
+ # Atrace tracing agent autodetects if its android and only runs if it is.
+ options.config.enable_atrace_trace = True
+ options.config.enable_chrome_trace = False
+ options.SetTimelineBasedMetrics([
+ 'clockSyncLatencyMetric',
+ 'powerMetric',
+ 'tracingMetric'
+ ])
+ return options
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return not possible_browser.platform.HasBattOrConnected()
+
+ def CreateStorySet(self, options):
+ return page_sets.IdleStorySet()
+
+ @classmethod
+ def ShouldTearDownStateAfterEachStoryRun(cls):
+ return True
+
+ @classmethod
+ def Name(cls):
+ return 'power.idle_platform'
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/page_sets/idle_platform.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698