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

Side by Side Diff: tools/perf/benchmarks/page_cycler.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/gpu_times.py ('k') | tools/perf/benchmarks/session_restore.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 page_cycler 5 from measurements import page_cycler
6 import page_sets 6 import page_sets
7 from telemetry import benchmark 7 from telemetry import benchmark
8 8
9 9
10 class _PageCycler(benchmark.Benchmark): 10 class _PageCycler(benchmark.Benchmark):
11 options = {'pageset_repeat': 6} 11 options = {'pageset_repeat': 6}
12 cold_load_percent = 50 # % of page visits for which a cold load is forced
12 13
13 @classmethod 14 @classmethod
14 def Name(cls): 15 def Name(cls):
15 return 'page_cycler' 16 return 'page_cycler'
16 17
17 @classmethod 18 @classmethod
18 def AddBenchmarkCommandLineArgs(cls, parser): 19 def AddBenchmarkCommandLineArgs(cls, parser):
19 parser.add_option('--report-speed-index', 20 parser.add_option('--report-speed-index',
20 action='store_true', 21 action='store_true',
21 help='Enable the speed index metric.') 22 help='Enable the speed index metric.')
22 23
23 parser.add_option('--cold-load-percent', type='int', default=50, 24 @classmethod
24 help='%d of page visits for which a cold load is forced') 25 def ValueCanBeAddedPredicate(cls, _, is_first_result):
26 return cls.cold_load_percent > 0 or not is_first_result
25 27
26 def CreatePageTest(self, options): 28 def CreatePageTest(self, options):
27 return page_cycler.PageCycler( 29 return page_cycler.PageCycler(
28 page_repeat = options.page_repeat, 30 page_repeat = options.page_repeat,
29 pageset_repeat = options.pageset_repeat, 31 pageset_repeat = options.pageset_repeat,
30 cold_load_percent = options.cold_load_percent, 32 cold_load_percent = self.cold_load_percent,
31 report_speed_index = options.report_speed_index) 33 report_speed_index = options.report_speed_index)
32 34
33 35
34 # This is an old page set, we intend to remove it after more modern benchmarks 36 # This is an old page set, we intend to remove it after more modern benchmarks
35 # work on CrOS. 37 # work on CrOS.
36 @benchmark.Enabled('chromeos') 38 @benchmark.Enabled('chromeos')
37 class PageCyclerDhtml(_PageCycler): 39 class PageCyclerDhtml(_PageCycler):
38 """Benchmarks for various DHTML operations like simple animations.""" 40 """Benchmarks for various DHTML operations like simple animations."""
39 page_set = page_sets.DhtmlPageSet 41 page_set = page_sets.DhtmlPageSet
40 42
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 """Measures load time of the top 10 sites under simulated cable network. 134 """Measures load time of the top 10 sites under simulated cable network.
133 135
134 Recorded in June, 2013. Pages are loaded under the simplisticly simulated 136 Recorded in June, 2013. Pages are loaded under the simplisticly simulated
135 bandwidth and RTT constraints of a cable modem (5Mbit/s down, 1Mbit/s up, 137 bandwidth and RTT constraints of a cable modem (5Mbit/s down, 1Mbit/s up,
136 28ms RTT). Contention is realistically simulated, but slow start is not. 138 28ms RTT). Contention is realistically simulated, but slow start is not.
137 DNS lookups are 'free'. 139 DNS lookups are 'free'.
138 """ 140 """
139 tag = 'netsim' 141 tag = 'netsim'
140 page_set = page_sets.Top10PageSet 142 page_set = page_sets.Top10PageSet
141 options = { 143 options = {
142 'cold_load_percent': 100,
143 'extra_wpr_args_as_string': '--shaping_type=proxy --net=cable', 144 'extra_wpr_args_as_string': '--shaping_type=proxy --net=cable',
144 'pageset_repeat': 6, 145 'pageset_repeat': 6,
145 } 146 }
147 cold_load_percent = 100
146 148
147 @classmethod 149 @classmethod
148 def Name(cls): 150 def Name(cls):
149 return 'page_cycler.netsim.top_10' 151 return 'page_cycler.netsim.top_10'
150 152
151 def CreatePageTest(self, options): 153 def CreatePageTest(self, options):
152 return page_cycler.PageCycler( 154 return page_cycler.PageCycler(
153 page_repeat = options.page_repeat, 155 page_repeat = options.page_repeat,
154 pageset_repeat = options.pageset_repeat, 156 pageset_repeat = options.pageset_repeat,
155 cold_load_percent = options.cold_load_percent, 157 cold_load_percent = self.cold_load_percent,
156 report_speed_index = options.report_speed_index, 158 report_speed_index = options.report_speed_index,
157 clear_cache_before_each_run = True) 159 clear_cache_before_each_run = True)
158 160
159 161
160 @benchmark.Enabled('android') 162 @benchmark.Enabled('android')
161 class PageCyclerTop10Mobile(_PageCycler): 163 class PageCyclerTop10Mobile(_PageCycler):
162 """Page load time benchmark for the top 10 mobile web pages. 164 """Page load time benchmark for the top 10 mobile web pages.
163 165
164 Runs against pages recorded in November, 2013. 166 Runs against pages recorded in November, 2013.
165 """ 167 """
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 228
227 def CreatePageSet(self, options): 229 def CreatePageSet(self, options):
228 return page_sets.Typical25PageSet(run_no_page_interactions=True) 230 return page_sets.Typical25PageSet(run_no_page_interactions=True)
229 231
230 @benchmark.Disabled # crbug.com/443730 232 @benchmark.Disabled # crbug.com/443730
231 class PageCyclerBigJs(_PageCycler): 233 class PageCyclerBigJs(_PageCycler):
232 page_set = page_sets.BigJsPageSet 234 page_set = page_sets.BigJsPageSet
233 @classmethod 235 @classmethod
234 def Name(cls): 236 def Name(cls):
235 return 'page_cycler.big_js' 237 return 'page_cycler.big_js'
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/gpu_times.py ('k') | tools/perf/benchmarks/session_restore.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698