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
3 # found in the LICENSE file.
5 from telemetry
import benchmark
7 from measurements
import startup
11 class _StartWithUrl(benchmark
.Benchmark
):
12 page_set
= page_sets
.StartupPagesPageSet
13 test
= startup
.StartWithUrl
17 return 'start_with_url.startup_pages'
19 def CreatePageTest(self
, options
):
20 is_cold
= (self
.tag
== 'cold')
21 return self
.test(cold
=is_cold
)
24 @benchmark.Enabled('has tabs')
25 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
26 class StartWithUrlCold(_StartWithUrl
):
27 """Measure time to start Chrome cold with startup URLs"""
29 options
= {'pageset_repeat': 5}
33 return 'start_with_url.cold.startup_pages'
36 @benchmark.Enabled('has tabs')
37 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
38 class StartWithUrlWarm(_StartWithUrl
):
39 """Measure time to start Chrome warm with startup URLs"""
41 options
= {'pageset_repeat': 10}
44 return 'start_with_url.warm.startup_pages'