Chromium Code Reviews| Index: tools/perf/benchmarks/battor.py |
| diff --git a/tools/perf/benchmarks/battor.py b/tools/perf/benchmarks/battor.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..18645d1bb5ec565959dbfdc19c161f58560e7211 |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/battor.py |
| @@ -0,0 +1,36 @@ |
| +# 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.web_perf import timeline_based_measurement |
| +import page_sets |
| + |
| + |
| +class _BattOrBenchmark(perf_benchmark.PerfBenchmark): |
|
charliea (OOO until 10-5)
2016/05/16 19:30:21
Same note here as I have in the other CL: this isn
rnephew (Reviews Here)
2016/05/16 20:05:57
As written these are literally only battor benchma
charliea (OOO until 10-5)
2016/05/17 13:44:26
Acknowledged.
|
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + options = timeline_based_measurement.Options() |
| + options.config.enable_battor_trace = True |
| + # TODO(rnephew): Enable chrome trace when clock syncs work well with it. |
| + options.config.enable_chrome_trace = False |
| + options.SetTimelineBasedMetric('SystemHealthMetrics') |
| + return options |
| + |
| + @classmethod |
| + def ShouldDisable(cls, browser): |
| + # http://crbug.com/600463 |
|
charliea (OOO until 10-5)
2016/05/16 19:30:21
nit: I usually see crbugs in comments used as a so
rnephew (Reviews Here)
2016/05/16 20:05:56
Done.
|
| + galaxy_s5_type_name = 'SM-G900H' |
| + return browser.platform.GetDeviceTypeName() == galaxy_s5_type_name |
| + |
| + @classmethod |
| + def ShouldTerDownStateAfterEachStoryRun(cls): |
|
charliea (OOO until 10-5)
2016/05/16 19:30:21
s/Ter/Tear
rnephew (Reviews Here)
2016/05/16 20:05:57
Done.
charliea (OOO until 10-5)
2016/05/17 13:44:26
nit: you can delete this. it's the default impleme
rnephew (Reviews Here)
2016/05/17 16:18:03
Ned specifically asked me to add this, so interest
nednguyen
2016/05/17 17:17:56
What I meant is we override this to return True so
rnephew (Reviews Here)
2016/05/17 17:35:07
Changed to return true.
|
| + return False |
| + |
| +class BattOrPowerMobileSites(_BattOrBenchmark): |
| + page_set = page_sets.PowerCasesPageSet |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'BattOr.BattOrCases' |
| + |