OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2015 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 measurements import startup | |
7 import page_sets | |
8 from telemetry import benchmark | |
9 | |
10 | |
11 class _StartWithExt(perf_benchmark.PerfBenchmark): | |
12 """Base Benchmark for testing startup with extensions. """ | |
robliao
2015/07/16 18:33:23
Nit: Benchmark -> benchmark
sydli
2015/07/16 20:01:29
Done.
| |
13 page_set = page_sets.BlankPageSetWithExtensionProfile | |
14 tag = None | |
15 | |
16 @classmethod | |
17 def Name(cls): | |
18 return 'start_with_ext.blank_page' | |
19 | |
20 @classmethod | |
21 def ValueCanBeAddedPredicate(cls, _, is_first_result): | |
22 return not is_first_result | |
23 | |
24 def SetExtraBrowserOptions(self, options): | |
25 options.disable_default_apps = False | |
26 | |
27 def CreatePageTest(self, _): | |
28 is_cold = (self.tag == 'cold') | |
29 return startup.Startup(cold=is_cold) | |
30 | |
robliao
2015/07/16 18:33:23
Add extra linebreak here (2 Blank Lines at Top Lev
sydli
2015/07/16 20:01:29
Done.
| |
31 @benchmark.Enabled('has tabs') | |
32 @benchmark.Enabled('mac') # Currently only works on mac. | |
33 @benchmark.Disabled('win', 'linux', 'reference', 'android') | |
34 class StartWithExtCold(_StartWithExt): | |
35 """Measure time to start Chrome cold with extensions. """ | |
36 options = {'pageset_repeat': 5} | |
37 tag = 'cold' | |
38 | |
39 @classmethod | |
40 def Name(cls): | |
41 return 'start_with_ext.cold.blank_page' | |
robliao
2015/07/16 18:33:23
Tabs: 2 spaces here.
sydli
2015/07/16 20:01:29
Done.
| |
42 | |
43 | |
44 @benchmark.Enabled('has tabs') | |
45 @benchmark.Enabled('mac') # Currently only works on mac. | |
46 @benchmark.Disabled('win', 'linux', 'reference', 'android') | |
47 class StartWithExtWarm(_StartWithExt): | |
48 """Measure time to start Chrome warm with extensions. """ | |
49 options = {'pageset_repeat': 20} | |
50 tag = 'warm' | |
51 | |
52 @classmethod | |
53 def Name(cls): | |
54 return 'start_with_ext.warm.blank_page' | |
robliao
2015/07/16 18:33:23
Tabs: 2 spaces here
sydli
2015/07/16 20:01:29
Done.
| |
55 | |
OLD | NEW |