Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tools/perf/benchmarks/startup.py

Issue 962793004: [Telemetry] Make "discard_first_result" apply to user_stories too. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/benchmarks/session_restore.py ('k') | tools/perf/measurements/page_cycler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from measurements import startup 5 from measurements import startup
6 import page_sets 6 import page_sets
7 from telemetry import benchmark 7 from telemetry import benchmark
8 8
9 9
10 class _StartupCold(benchmark.Benchmark): 10 class _StartupCold(benchmark.Benchmark):
11 """Measures cold startup time with a clean profile.""" 11 """Measures cold startup time with a clean profile."""
12 options = {'pageset_repeat': 5} 12 options = {'pageset_repeat': 5}
13 13
14 @classmethod 14 @classmethod
15 def Name(cls): 15 def Name(cls):
16 return 'startup' 16 return 'startup'
17 17
18 def CreatePageTest(self, options): 18 def CreatePageTest(self, options):
19 return startup.Startup(cold=True) 19 return startup.Startup(cold=True)
20 20
21 21
22 class _StartupWarm(benchmark.Benchmark): 22 class _StartupWarm(benchmark.Benchmark):
23 """Measures warm startup time with a clean profile.""" 23 """Measures warm startup time with a clean profile."""
24 options = {'pageset_repeat': 20} 24 options = {'pageset_repeat': 20}
25 25
26 @classmethod 26 @classmethod
27 def Name(cls): 27 def Name(cls):
28 return 'startup' 28 return 'startup'
29 29
30 @classmethod
31 def ValueCanBeAddedPredicate(cls, _, is_first_result):
32 return not is_first_result
33
30 def CreatePageTest(self, options): 34 def CreatePageTest(self, options):
31 return startup.Startup(cold=False) 35 return startup.Startup(cold=False)
32 36
33 37
34 @benchmark.Enabled('has tabs') 38 @benchmark.Enabled('has tabs')
35 @benchmark.Disabled('snowleopard') # crbug.com/336913 39 @benchmark.Disabled('snowleopard') # crbug.com/336913
36 class StartupColdBlankPage(_StartupCold): 40 class StartupColdBlankPage(_StartupCold):
37 """Measures cold startup time with a clean profile.""" 41 """Measures cold startup time with a clean profile."""
38 tag = 'cold' 42 tag = 'cold'
39 page_set = page_sets.BlankPageSet 43 page_set = page_sets.BlankPageSet
40 44
41 @classmethod 45 @classmethod
42 def Name(cls): 46 def Name(cls):
43 return 'startup.cold.blank_page' 47 return 'startup.cold.blank_page'
44 48
45 49
46 @benchmark.Enabled('has tabs') 50 @benchmark.Enabled('has tabs')
47 class StartupWarmBlankPage(_StartupWarm): 51 class StartupWarmBlankPage(_StartupWarm):
48 """Measures warm startup time with a clean profile.""" 52 """Measures warm startup time with a clean profile."""
49 tag = 'warm' 53 tag = 'warm'
50 page_set = page_sets.BlankPageSet 54 page_set = page_sets.BlankPageSet
51 55
52 @classmethod 56 @classmethod
53 def Name(cls): 57 def Name(cls):
54 return 'startup.warm.blank_page' 58 return 'startup.warm.blank_page'
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/session_restore.py ('k') | tools/perf/measurements/page_cycler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698