Chromium Code Reviews| 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..b9b2e7cef473001780d53a0d4adaeb45e6cd2430 |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/idle_platform.py |
| @@ -0,0 +1,42 @@ |
| +# Copyright 2016 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. |
| + |
| +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): |
|
nednguyen
2017/03/13 16:33:35
Let put this benchmark in benchmarks/power.py?
+
rnephew (Reviews Here)
2017/03/13 21:29:18
Waiting for Charlies response on this.
|
| + """Idle platform benchmark. |
| + |
| + This benchmark just starts up tracing agents and lets the platform sit idle. |
| + """ |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + options = timeline_based_measurement.Options( |
| + chrome_trace_category_filter.ChromeTraceCategoryFilter()) |
| + options.config.chrome_trace_config.category_filter.AddFilterString('rail') |
| + options.config.enable_battor_trace = True |
| + options.config.enable_cpu_trace = True |
| + options.config.enable_chrome_trace = False |
| + # 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' |