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

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

Issue 2744273003: [Telemetry] Add benchmark that doesn't launch chrome and collects platform data. (Closed)
Patch Set: Disable cpu tracing and rebase and run generate_perf_json Created 3 years, 9 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/perf/benchmarks/idle_platform.py
diff --git a/tools/perf/benchmarks/idle_platform.py b/tools/perf/benchmarks/idle_platform.py
new file mode 100644
index 0000000000000000000000000000000000000000..1212f1f1f5a26dcbd6b3c4e972c937641bde9541
--- /dev/null
+++ b/tools/perf/benchmarks/idle_platform.py
@@ -0,0 +1,42 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
charliea (OOO until 10-5) 2017/03/20 14:20:25 2017
nednguyen 2017/03/20 16:54:35 this should be move to power.py file
rnephew (Reviews Here) 2017/03/30 20:58:23 Done.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from core import perf_benchmark
+
+from telemetry.timeline import chrome_trace_category_filter
+from telemetry.web_perf import timeline_based_measurement
+import page_sets
+
+
+class IdlePlatformBenchmark(perf_benchmark.PerfBenchmark):
+ """Idle platform benchmark.
+
+ This benchmark just starts up tracing agents and lets the platform sit idle.
charliea (OOO until 10-5) 2017/03/20 14:20:25 Please include information about _why_ we want thi
rnephew (Reviews Here) 2017/03/30 20:58:23 Done.
+ """
+ def CreateTimelineBasedMeasurementOptions(self):
+ options = timeline_based_measurement.Options(
+ chrome_trace_category_filter.ChromeTraceCategoryFilter())
+ options.config.chrome_trace_config.category_filter.AddFilterString('rail')
nednguyen 2017/03/20 16:54:35 we don't enable Chrome trace, so there is no use i
rnephew (Reviews Here) 2017/03/30 20:58:23 Done.
+ options.config.enable_battor_trace = True
+ options.config.enable_cpu_trace = False
charliea (OOO until 10-5) 2017/03/20 14:20:25 Instead of options.config.enable_cpu_trace = False
rnephew (Reviews Here) 2017/03/30 20:58:23 https://github.com/catapult-project/catapult/issue
+ options.config.enable_chrome_trace = False
charliea (OOO until 10-5) 2017/03/20 14:20:25 nit: no need to respecify the default
rnephew (Reviews Here) 2017/03/30 20:58:23 It actually is required. It was failing to clock s
+ # Atrace tracing agent autodetects if its android and only runs if it is.
+ options.config.enable_atrace_trace = True
+ options.SetTimelineBasedMetrics([
+ 'clockSyncLatencyMetric',
+ 'powerMetric',
+ 'tracingMetric'
+ ])
+ return options
+
+ def CreateStorySet(self, options):
+ return page_sets.IdlePlatformPageSet()
+
+ @classmethod
+ def ShouldTearDownStateAfterEachStoryRun(cls):
+ return True
+
+ @classmethod
+ def Name(cls):
+ return 'idle_platform'

Powered by Google App Engine
This is Rietveld 408576698