Chromium Code Reviews| 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 from telemetry.web_perf import timeline_based_measurement | |
| 7 import page_sets | |
| 8 | |
| 9 | |
| 10 class _BattOrBenchmark(perf_benchmark.PerfBenchmark): | |
| 11 | |
| 12 def CreateTimelineBasedMeasurementOptions(self): | |
| 13 options = timeline_based_measurement.Options() | |
| 14 options.config.enable_battor_trace = True | |
| 15 # TODO(rnephew): Enable chrome trace when clock syncs work well with it. | |
| 16 options.config.enable_chrome_trace = False | |
| 17 options.SetTimelineBasedMetric('SystemHealthMetrics') | |
| 18 return options | |
| 19 | |
| 20 @classmethod | |
| 21 def ShouldDisable(cls, browser): | |
|
nednguyen
2016/05/17 17:40:22
Also we should disable this on bots that don't hav
rnephew (Reviews Here)
2016/05/17 18:54:15
Done.
| |
| 22 # Galaxy S5s have problems with running system health metrics. | |
| 23 # http://crbug.com/600463 | |
| 24 galaxy_s5_type_name = 'SM-G900H' | |
| 25 return browser.platform.GetDeviceTypeName() == galaxy_s5_type_name | |
| 26 | |
| 27 @classmethod | |
| 28 def ShouldTearDownStateAfterEachStoryRun(cls): | |
| 29 return True | |
| 30 | |
| 31 | |
| 32 class BattOrPowerMobileSites(_BattOrBenchmark): | |
| 33 page_set = page_sets.power_cases.PowerCasesPageSet | |
| 34 | |
| 35 @classmethod | |
| 36 def Name(cls): | |
| 37 return 'BattOr.BattOrCases' | |
| 38 | |
| OLD | NEW |