OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from measurements import page_cycler | 5 from measurements import page_cycler |
6 import page_sets | 6 import page_sets |
7 from telemetry import benchmark | 7 from telemetry import benchmark |
8 | 8 |
9 | 9 |
10 class _PageCycler(benchmark.Benchmark): | 10 class _PageCycler(benchmark.Benchmark): |
11 options = {'pageset_repeat': 6} | 11 options = {'pageset_repeat': 6} |
12 | 12 |
13 @classmethod | 13 @classmethod |
14 def Name(cls): | 14 def Name(cls): |
15 return 'page_cycler' | 15 return 'page_cycler' |
16 | 16 |
17 @classmethod | 17 @classmethod |
18 def AddBenchmarkCommandLineArgs(cls, parser): | 18 def AddBenchmarkCommandLineArgs(cls, parser): |
19 parser.add_option('--report-speed-index', | 19 parser.add_option('--report-speed-index', |
20 action='store_true', | 20 action='store_true', |
21 help='Enable the speed index metric.') | 21 help='Enable the speed index metric.') |
22 | 22 |
23 parser.add_option('--cold-load-percent', type='int', default=50, | 23 parser.add_option('--cold-load-percent', type='int', default=50, |
24 help='%d of page visits for which a cold load is forced') | 24 help='%d of page visits for which a cold load is forced') |
25 | 25 |
26 @classmethod | |
27 def ProcessCommandLineArgs(cls, parser, args): | |
nednguyen
2015/02/27 13:27:35
Don't you need to call super class' ProcessCommand
| |
28 args.discard_first_result = args.cold_load_percent == 0 | |
29 | |
26 def CreatePageTest(self, options): | 30 def CreatePageTest(self, options): |
27 return page_cycler.PageCycler( | 31 return page_cycler.PageCycler( |
28 page_repeat = options.page_repeat, | 32 page_repeat = options.page_repeat, |
29 pageset_repeat = options.pageset_repeat, | 33 pageset_repeat = options.pageset_repeat, |
30 cold_load_percent = options.cold_load_percent, | 34 cold_load_percent = options.cold_load_percent, |
31 report_speed_index = options.report_speed_index) | 35 report_speed_index = options.report_speed_index) |
32 | 36 |
33 | 37 |
34 # This is an old page set, we intend to remove it after more modern benchmarks | 38 # This is an old page set, we intend to remove it after more modern benchmarks |
35 # work on CrOS. | 39 # work on CrOS. |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 return page_sets.Typical25PageSet(run_no_page_interactions=True) | 216 return page_sets.Typical25PageSet(run_no_page_interactions=True) |
213 | 217 |
214 | 218 |
215 @benchmark.Disabled # crbug.com/443730 | 219 @benchmark.Disabled # crbug.com/443730 |
216 class PageCyclerBigJs(_PageCycler): | 220 class PageCyclerBigJs(_PageCycler): |
217 page_set = page_sets.BigJsPageSet | 221 page_set = page_sets.BigJsPageSet |
218 @classmethod | 222 @classmethod |
219 def Name(cls): | 223 def Name(cls): |
220 return 'page_cycler.big_js' | 224 return 'page_cycler.big_js' |
221 | 225 |
226 | |
OLD | NEW |