OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 startup | 5 from measurements import startup |
6 import page_sets | 6 import page_sets |
7 from telemetry import benchmark | 7 from telemetry import benchmark |
8 | 8 |
9 | 9 |
| 10 class _StartWithUrl(benchmark.Benchmark): |
| 11 page_set = page_sets.StartupPagesPageSet |
| 12 test = startup.StartWithUrl |
| 13 |
| 14 def CreatePageTest(self, options): |
| 15 is_cold = (self.tag == 'cold') |
| 16 return self.test(cold=is_cold) |
| 17 |
| 18 |
10 @benchmark.Enabled('has tabs') | 19 @benchmark.Enabled('has tabs') |
11 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') | 20 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
12 class StartWithUrlCold(benchmark.Benchmark): | 21 class StartWithUrlCold(_StartWithUrl): |
13 """Measure time to start Chrome cold with startup URLs""" | 22 """Measure time to start Chrome cold with startup URLs""" |
14 tag = 'cold' | 23 tag = 'cold' |
15 test = startup.StartWithUrl(cold=True) | |
16 page_set = page_sets.StartupPagesPageSet | |
17 options = {'pageset_repeat': 5} | 24 options = {'pageset_repeat': 5} |
18 | 25 |
19 | 26 |
20 @benchmark.Enabled('has tabs') | 27 @benchmark.Enabled('has tabs') |
21 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') | 28 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
22 class StartWithUrlWarm(benchmark.Benchmark): | 29 class StartWithUrlWarm(_StartWithUrl): |
23 """Measure time to start Chrome warm with startup URLs""" | 30 """Measure time to start Chrome warm with startup URLs""" |
24 tag = 'warm' | 31 tag = 'warm' |
25 test = startup.StartWithUrl(cold=False) | |
26 page_set = page_sets.StartupPagesPageSet | |
27 options = {'pageset_repeat': 10} | 32 options = {'pageset_repeat': 10} |
OLD | NEW |