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.
5 from core
import perf_benchmark
6 from measurements
import startup
8 from telemetry
import benchmark
11 class _StartWithExt(perf_benchmark
.PerfBenchmark
):
12 """Base benchmark for testing startup with extensions."""
13 page_set
= page_sets
.BlankPageSetWithExtensionProfile
18 return 'start_with_ext.blank_page'
21 def ValueCanBeAddedPredicate(cls
, _
, is_first_result
):
22 return not is_first_result
24 def SetExtraBrowserOptions(self
, options
):
25 options
.disable_default_apps
= False
27 def CreatePageTest(self
, _
):
28 is_cold
= (self
.tag
== 'cold')
29 return startup
.Startup(cold
=is_cold
)
32 @benchmark.Enabled('has tabs')
33 @benchmark.Enabled('mac') # Currently only works on mac.
34 @benchmark.Disabled('win', 'linux', 'reference', 'android')
35 class StartWithExtCold(_StartWithExt
):
36 """Measure time to start Chrome cold with extensions."""
37 options
= {'pageset_repeat': 5}
42 return 'start_with_ext.cold.blank_page'
45 @benchmark.Enabled('has tabs')
46 @benchmark.Enabled('mac') # Currently only works on mac.
47 @benchmark.Disabled('win', 'linux', 'reference', 'android')
48 class StartWithExtWarm(_StartWithExt
):
49 """Measure time to start Chrome warm with extensions."""
50 options
= {'pageset_repeat': 20}
55 return 'start_with_ext.warm.blank_page'