[Telemetry] Remove support for automatic record creation in smoothness controller.
[chromium-blink-merge.git] / tools / perf / benchmarks / smoothness.py
blobc8379c4990d5c8f32d0ba72ef017fd3c93886e4c
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 telemetry import benchmark
7 from benchmarks import silk_flags
8 from benchmarks import webgl_expectations
9 from measurements import smoothness
10 import page_sets
13 class SmoothnessTop25(benchmark.Benchmark):
14 """Measures rendering statistics while scrolling down the top 25 web pages.
16 http://www.chromium.org/developers/design-documents/rendering-benchmarks
17 """
18 test = smoothness.Smoothness
19 page_set = page_sets.Top25SmoothPageSet
21 @classmethod
22 def Name(cls):
23 return 'smoothness.top_25_smooth'
26 class SmoothnessToughFiltersCases(benchmark.Benchmark):
27 """Measures frame rate and a variety of other statistics.
29 Uses a selection of pages making use of SVG and CSS Filter Effects.
30 """
31 test = smoothness.Smoothness
32 page_set = page_sets.ToughFiltersCasesPageSet
34 @classmethod
35 def Name(cls):
36 return 'smoothness.tough_filters_cases'
39 # crbug.com/388877, crbug.com/396127
40 @benchmark.Disabled('mac', 'win', 'android')
41 class SmoothnessToughCanvasCases(benchmark.Benchmark):
42 """Measures frame rate and a variety of other statistics.
44 Uses a selection of pages making use of the 2D Canvas API.
45 """
46 test = smoothness.Smoothness
47 page_set = page_sets.ToughCanvasCasesPageSet
49 @classmethod
50 def Name(cls):
51 return 'smoothness.tough_canvas_cases'
54 @benchmark.Disabled('android') # crbug.com/373812
55 class SmoothnessToughWebGLCases(benchmark.Benchmark):
56 test = smoothness.Smoothness
57 page_set = page_sets.ToughWebglCasesPageSet
59 @classmethod
60 def CreateExpectations(cls):
61 return webgl_expectations.WebGLExpectations()
63 @classmethod
64 def Name(cls):
65 return 'smoothness.tough_webgl_cases'
68 @benchmark.Enabled('android')
69 class SmoothnessMaps(benchmark.Benchmark):
70 page_set = page_sets.MapsPageSet
72 @classmethod
73 def CreateExpectations(cls):
74 return webgl_expectations.MapsExpectations()
76 @classmethod
77 def Name(cls):
78 return 'smoothness.maps'
81 @benchmark.Disabled('android')
82 class SmoothnessKeyDesktopMoveCases(benchmark.Benchmark):
83 test = smoothness.Smoothness
84 page_set = page_sets.KeyDesktopMoveCasesPageSet
86 @classmethod
87 def Name(cls):
88 return 'smoothness.key_desktop_move_cases'
91 @benchmark.Enabled('android')
92 class SmoothnessKeyMobileSites(benchmark.Benchmark):
93 """Measures rendering statistics while scrolling down the key mobile sites.
95 http://www.chromium.org/developers/design-documents/rendering-benchmarks
96 """
97 test = smoothness.Smoothness
98 page_set = page_sets.KeyMobileSitesSmoothPageSet
100 @classmethod
101 def Name(cls):
102 return 'smoothness.key_mobile_sites_smooth'
105 class SmoothnessToughAnimationCases(benchmark.Benchmark):
106 test = smoothness.Smoothness
107 page_set = page_sets.ToughAnimationCasesPageSet
109 @classmethod
110 def Name(cls):
111 return 'smoothness.tough_animation_cases'
114 @benchmark.Enabled('android')
115 class SmoothnessKeySilkCases(benchmark.Benchmark):
116 """Measures rendering statistics for the key silk cases without GPU
117 rasterization.
119 test = smoothness.Smoothness
120 page_set = page_sets.KeySilkCasesPageSet
122 @classmethod
123 def Name(cls):
124 return 'smoothness.key_silk_cases'
127 @benchmark.Enabled('android')
128 class SmoothnessGpuRasterizationTop25(benchmark.Benchmark):
129 """Measures rendering statistics for the top 25 with GPU rasterization.
131 tag = 'gpu_rasterization'
132 test = smoothness.Smoothness
133 page_set = page_sets.Top25SmoothPageSet
135 def CustomizeBrowserOptions(self, options):
136 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
138 @classmethod
139 def Name(cls):
140 return 'smoothness.gpu_rasterization.top_25_smooth'
143 @benchmark.Enabled('android')
144 class SmoothnessGpuRasterizationKeyMobileSites(benchmark.Benchmark):
145 """Measures rendering statistics for the key mobile sites with GPU
146 rasterization.
148 tag = 'gpu_rasterization'
149 test = smoothness.Smoothness
150 page_set = page_sets.KeyMobileSitesSmoothPageSet
152 def CustomizeBrowserOptions(self, options):
153 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
155 @classmethod
156 def Name(cls):
157 return 'smoothness.gpu_rasterization.key_mobile_sites_smooth'
160 @benchmark.Enabled('android')
161 class SmoothnessSyncScrollKeyMobileSites(benchmark.Benchmark):
162 """Measures rendering statistics for the key mobile sites with synchronous
163 (main thread) scrolling.
165 tag = 'sync_scroll'
166 test = smoothness.Smoothness
167 page_set = page_sets.KeyMobileSitesSmoothPageSet
169 def CustomizeBrowserOptions(self, options):
170 silk_flags.CustomizeBrowserOptionsForSyncScrolling(options)
172 @classmethod
173 def Name(cls):
174 return 'smoothness.sync_scroll.key_mobile_sites_smooth'
177 @benchmark.Enabled('android')
178 class SmoothnessSimpleMobilePages(benchmark.Benchmark):
179 """Measures rendering statistics for simple mobile sites page set.
181 test = smoothness.Smoothness
182 page_set = page_sets.SimpleMobileSitesPageSet
184 @classmethod
185 def Name(cls):
186 return 'smoothness.simple_mobile_sites'
189 @benchmark.Enabled('android')
190 class SmoothnessFlingSimpleMobilePages(benchmark.Benchmark):
191 """Measures rendering statistics for flinging a simple mobile sites page set.
193 test = smoothness.Smoothness
194 page_set = page_sets.SimpleMobileSitesFlingPageSet
196 def CustomizeBrowserOptions(self, options):
197 # As the fling parameters cannot be analytically determined to not
198 # overscroll, disable overscrolling explicitly. Overscroll behavior is
199 # orthogonal to fling performance, and its activation is only more noise.
200 options.AppendExtraBrowserArgs('--disable-overscroll-edge-effect')
202 @classmethod
203 def Name(cls):
204 return 'smoothness.fling.simple_mobile_sites'
207 @benchmark.Enabled('android', 'chromeos')
208 class SmoothnessToughPinchZoomCases(benchmark.Benchmark):
209 """Measures rendering statistics for pinch-zooming into the tough pinch zoom
210 cases.
212 test = smoothness.Smoothness
213 page_set = page_sets.ToughPinchZoomCasesPageSet
215 @classmethod
216 def Name(cls):
217 return 'smoothness.tough_pinch_zoom_cases'
220 @benchmark.Enabled('android', 'chromeos')
221 class SmoothnessToughScrollingWhileZoomedInCases(benchmark.Benchmark):
222 """Measures rendering statistics for pinch-zooming then diagonal scrolling"""
223 test = smoothness.Smoothness
224 page_set = page_sets.ToughScrollingWhileZoomedInCasesPageSet
226 @classmethod
227 def Name(cls):
228 return 'smoothness.tough_scrolling_while_zoomed_in_cases'
231 @benchmark.Enabled('android')
232 class SmoothnessPolymer(benchmark.Benchmark):
233 """Measures rendering statistics for Polymer cases.
235 test = smoothness.Smoothness
236 page_set = page_sets.PolymerPageSet
238 @classmethod
239 def Name(cls):
240 return 'smoothness.polymer'
243 @benchmark.Enabled('android')
244 class SmoothnessGpuRasterizationPolymer(benchmark.Benchmark):
245 """Measures rendering statistics for the Polymer cases with GPU rasterization.
247 tag = 'gpu_rasterization'
248 test = smoothness.Smoothness
249 page_set = page_sets.PolymerPageSet
251 def CustomizeBrowserOptions(self, options):
252 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
254 @classmethod
255 def Name(cls):
256 return 'smoothness.gpu_rasterization.polymer'
259 class SmoothnessToughFastScrollingCases(benchmark.Benchmark):
260 test = smoothness.Smoothness
261 page_set = page_sets.ToughScrollingCasesPageSet
262 options = {'story_label_filter': 'fastscrolling'}
264 @classmethod
265 def Name(cls):
266 return 'smoothness.tough_scrolling_cases'
269 class SmoothnessImageDecodingCases(benchmark.Benchmark):
270 """Measures decoding statistics for jpeg images.
272 test = smoothness.Smoothness
273 page_set = page_sets.ImageDecodingCasesPageSet
275 def CustomizeBrowserOptions(self, options):
276 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
277 options.AppendExtraBrowserArgs('--disable-accelerated-jpeg-decoding')
279 @classmethod
280 def Name(cls):
281 return 'smoothness.image_decoding_cases'
284 class SmoothnessGpuImageDecodingCases(benchmark.Benchmark):
285 """Measures decoding statistics for jpeg images with GPU rasterization.
287 tag = 'gpu_rasterization_and_decoding'
288 test = smoothness.Smoothness
289 page_set = page_sets.ImageDecodingCasesPageSet
291 def CustomizeBrowserOptions(self, options):
292 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
293 # TODO(sugoi): Remove the following line once M41 goes stable
294 options.AppendExtraBrowserArgs('--enable-accelerated-jpeg-decoding')
296 @classmethod
297 def Name(cls):
298 return 'smoothness.gpu_rasterization_and_decoding.image_decoding_cases'
301 @benchmark.Enabled('android')
302 class SmoothnessPathologicalMobileSites(benchmark.Benchmark):
303 """Measures task execution statistics while scrolling pathological sites.
305 test = smoothness.Smoothness
306 page_set = page_sets.PathologicalMobileSitesPageSet
308 @classmethod
309 def Name(cls):
310 return 'smoothness.pathological_mobile_sites'
313 @benchmark.Enabled('android')
314 class SmoothnessSyncScrollPathologicalMobileSites(benchmark.Benchmark):
315 """Measures task execution statistics while sync-scrolling pathological sites.
317 tag = 'sync_scroll'
318 page_set = page_sets.PathologicalMobileSitesPageSet
319 test = smoothness.Smoothness
321 def CustomizeBrowserOptions(self, options):
322 silk_flags.CustomizeBrowserOptionsForSyncScrolling(options)
324 @classmethod
325 def Name(cls):
326 return 'smoothness.sync_scroll.pathological_mobile_sites'
329 class SmoothnessToughAnimatedImageCases(benchmark.Benchmark):
330 test = smoothness.Smoothness
331 page_set = page_sets.ToughAnimatedImageCasesPageSet
333 @classmethod
334 def Name(cls):
335 return 'smoothness.tough_animated_image_cases'