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 core
import perf_benchmark
7 from measurements
import startup
9 from telemetry
import benchmark
12 class _StartWithUrl(perf_benchmark
.PerfBenchmark
):
13 page_set
= page_sets
.StartupPagesPageSet
14 test
= startup
.StartWithUrl
18 return 'start_with_url.startup_pages'
20 def CreatePageTest(self
, options
):
21 is_cold
= (self
.tag
== 'cold')
22 return self
.test(cold
=is_cold
)
25 @benchmark.Enabled('has tabs')
26 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
27 class StartWithUrlCold(_StartWithUrl
):
28 """Measure time to start Chrome cold with startup URLs"""
30 options
= {'pageset_repeat': 5}
34 return 'start_with_url.cold.startup_pages'
37 @benchmark.Enabled('has tabs')
38 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
39 class StartWithUrlWarm(_StartWithUrl
):
40 """Measure time to start Chrome warm with startup URLs"""
42 options
= {'pageset_repeat': 10}
45 return 'start_with_url.warm.startup_pages'