[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / perf / benchmarks / startup.py
blob7204ffdb18248e88889aaf01eb46f78cf6bc374c
1 # Copyright 2013 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
8 import page_sets
9 from telemetry import benchmark
12 class _StartupCold(perf_benchmark.PerfBenchmark):
13 """Measures cold startup time with a clean profile."""
14 options = {'pageset_repeat': 5}
16 @classmethod
17 def Name(cls):
18 return 'startup'
20 def CreatePageTest(self, options):
21 return startup.Startup(cold=True)
24 class _StartupWarm(perf_benchmark.PerfBenchmark):
25 """Measures warm startup time with a clean profile."""
26 options = {'pageset_repeat': 20}
28 @classmethod
29 def Name(cls):
30 return 'startup'
32 @classmethod
33 def ValueCanBeAddedPredicate(cls, _, is_first_result):
34 return not is_first_result
36 def CreatePageTest(self, options):
37 return startup.Startup(cold=False)
40 @benchmark.Enabled('has tabs')
41 @benchmark.Disabled('snowleopard') # crbug.com/336913
42 class StartupColdBlankPage(_StartupCold):
43 """Measures cold startup time with a clean profile."""
44 tag = 'cold'
45 page_set = page_sets.BlankPageSet
47 @classmethod
48 def Name(cls):
49 return 'startup.cold.blank_page'
52 @benchmark.Enabled('has tabs')
53 class StartupWarmBlankPage(_StartupWarm):
54 """Measures warm startup time with a clean profile."""
55 tag = 'warm'
56 page_set = page_sets.BlankPageSet
58 @classmethod
59 def Name(cls):
60 return 'startup.warm.blank_page'
62 @benchmark.Enabled('has tabs')
63 @benchmark.Enabled('win', 'linux', 'mac')
64 @benchmark.Disabled('reference', 'android') # http://crbug.com/481919
65 class StartupLargeProfileColdBlankPage(_StartupCold):
66 """Measures cold startup time with a large profile."""
67 tag = 'cold'
68 page_set = page_sets.BlankPageSetWithLargeProfile
69 options = {'pageset_repeat': 3}
71 def __init__(self, max_failures=None):
72 super(StartupLargeProfileColdBlankPage, self).__init__(max_failures)
74 def SetExtraBrowserOptions(self, options):
75 options.browser_startup_timeout = 10 * 60
77 @classmethod
78 def Name(cls):
79 return 'startup.large_profile.cold.blank_page'
81 @benchmark.Enabled('has tabs')
82 @benchmark.Enabled('win', 'linux', 'mac')
83 @benchmark.Disabled('reference', 'android') # http://crbug.com/481919
84 class StartupLargeProfileWarmBlankPage(_StartupWarm):
85 """Measures warm startup time with a large profile."""
86 tag = 'warm'
87 page_set = page_sets.BlankPageSetWithLargeProfile
88 options = {'pageset_repeat': 4}
90 def __init__(self, max_failures=None):
91 super(StartupLargeProfileWarmBlankPage, self).__init__(max_failures)
93 def SetExtraBrowserOptions(self, options):
94 options.browser_startup_timeout = 10 * 60
96 @classmethod
97 def Name(cls):
98 return 'startup.large_profile.warm.blank_page'