| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from core import perf_benchmark |
| 6 |
| 7 from telemetry.timeline import chrome_trace_category_filter |
| 8 from telemetry.web_perf import timeline_based_measurement |
| 9 import page_sets |
| 10 |
| 11 |
| 12 class IdlePlatformBenchmark(perf_benchmark.PerfBenchmark): |
| 13 """Idle platform benchmark. |
| 14 |
| 15 This benchmark just starts up tracing agents and lets the platform sit idle. |
| 16 """ |
| 17 def CreateTimelineBasedMeasurementOptions(self): |
| 18 options = timeline_based_measurement.Options( |
| 19 chrome_trace_category_filter.ChromeTraceCategoryFilter()) |
| 20 options.config.chrome_trace_config.category_filter.AddFilterString('rail') |
| 21 options.config.enable_battor_trace = True |
| 22 options.config.enable_cpu_trace = True |
| 23 options.config.enable_chrome_trace = False |
| 24 # Atrace tracing agent autodetects if its android and only runs if it is. |
| 25 options.config.enable_atrace_trace = True |
| 26 options.SetTimelineBasedMetrics([ |
| 27 'clockSyncLatencyMetric', |
| 28 'powerMetric', |
| 29 'tracingMetric' |
| 30 ]) |
| 31 return options |
| 32 |
| 33 def CreateStorySet(self, options): |
| 34 return page_sets.IdlePlatformPageSet() |
| 35 |
| 36 @classmethod |
| 37 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 38 return True |
| 39 |
| 40 @classmethod |
| 41 def Name(cls): |
| 42 return 'idle_platform' |
| OLD | NEW |