Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / tools / perf / benchmarks / smoothness.py
blob067825bd7515360db74274cdd2f29ee7e1be1e32
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', 'mac', 'win') # 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 test = smoothness.Smoothness
71 page_set = page_sets.MapsPageSet
73 @classmethod
74 def CreateExpectations(cls):
75 return webgl_expectations.MapsExpectations()
77 @classmethod
78 def Name(cls):
79 return 'smoothness.maps'
82 @benchmark.Disabled('android')
83 class SmoothnessKeyDesktopMoveCases(benchmark.Benchmark):
84 test = smoothness.Smoothness
85 page_set = page_sets.KeyDesktopMoveCasesPageSet
87 @classmethod
88 def Name(cls):
89 return 'smoothness.key_desktop_move_cases'
92 @benchmark.Enabled('android')
93 class SmoothnessKeyMobileSites(benchmark.Benchmark):
94 """Measures rendering statistics while scrolling down the key mobile sites.
96 http://www.chromium.org/developers/design-documents/rendering-benchmarks
97 """
98 test = smoothness.Smoothness
99 page_set = page_sets.KeyMobileSitesSmoothPageSet
101 @classmethod
102 def Name(cls):
103 return 'smoothness.key_mobile_sites_smooth'
106 class SmoothnessToughAnimationCases(benchmark.Benchmark):
107 test = smoothness.Smoothness
108 page_set = page_sets.ToughAnimationCasesPageSet
110 @classmethod
111 def Name(cls):
112 return 'smoothness.tough_animation_cases'
115 @benchmark.Enabled('android')
116 class SmoothnessKeySilkCases(benchmark.Benchmark):
117 """Measures rendering statistics for the key silk cases without GPU
118 rasterization.
120 test = smoothness.Smoothness
121 page_set = page_sets.KeySilkCasesPageSet
123 @classmethod
124 def Name(cls):
125 return 'smoothness.key_silk_cases'
128 @benchmark.Enabled('android')
129 class SmoothnessGpuRasterizationTop25(benchmark.Benchmark):
130 """Measures rendering statistics for the top 25 with GPU rasterization.
132 tag = 'gpu_rasterization'
133 test = smoothness.Smoothness
134 page_set = page_sets.Top25SmoothPageSet
136 def CustomizeBrowserOptions(self, options):
137 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
139 @classmethod
140 def Name(cls):
141 return 'smoothness.gpu_rasterization.top_25_smooth'
144 @benchmark.Enabled('android')
145 class SmoothnessGpuRasterizationKeyMobileSites(benchmark.Benchmark):
146 """Measures rendering statistics for the key mobile sites with GPU
147 rasterization.
149 tag = 'gpu_rasterization'
150 test = smoothness.Smoothness
151 page_set = page_sets.KeyMobileSitesSmoothPageSet
153 def CustomizeBrowserOptions(self, options):
154 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
156 @classmethod
157 def Name(cls):
158 return 'smoothness.gpu_rasterization.key_mobile_sites_smooth'
161 @benchmark.Enabled('android')
162 class SmoothnessSyncScrollKeyMobileSites(benchmark.Benchmark):
163 """Measures rendering statistics for the key mobile sites with synchronous
164 (main thread) scrolling.
166 tag = 'sync_scroll'
167 test = smoothness.Smoothness
168 page_set = page_sets.KeyMobileSitesSmoothPageSet
170 def CustomizeBrowserOptions(self, options):
171 silk_flags.CustomizeBrowserOptionsForSyncScrolling(options)
173 @classmethod
174 def Name(cls):
175 return 'smoothness.sync_scroll.key_mobile_sites_smooth'
178 @benchmark.Enabled('android')
179 class SmoothnessSimpleMobilePages(benchmark.Benchmark):
180 """Measures rendering statistics for simple mobile sites page set.
182 test = smoothness.Smoothness
183 page_set = page_sets.SimpleMobileSitesPageSet
185 @classmethod
186 def Name(cls):
187 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'
206 @benchmark.Enabled('android', 'chromeos')
207 class SmoothnessToughPinchZoomCases(benchmark.Benchmark):
208 """Measures rendering statistics for pinch-zooming into the tough pinch zoom
209 cases.
211 test = smoothness.Smoothness
212 page_set = page_sets.ToughPinchZoomCasesPageSet
214 @classmethod
215 def Name(cls):
216 return 'smoothness.tough_pinch_zoom_cases'
219 @benchmark.Enabled('android')
220 class SmoothnessPolymer(benchmark.Benchmark):
221 """Measures rendering statistics for Polymer cases.
223 test = smoothness.Smoothness
224 page_set = page_sets.PolymerPageSet
226 @classmethod
227 def Name(cls):
228 return 'smoothness.polymer'
231 @benchmark.Enabled('android')
232 class SmoothnessGpuRasterizationPolymer(benchmark.Benchmark):
233 """Measures rendering statistics for the Polymer cases with GPU rasterization.
235 tag = 'gpu_rasterization'
236 test = smoothness.Smoothness
237 page_set = page_sets.PolymerPageSet
239 def CustomizeBrowserOptions(self, options):
240 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
242 @classmethod
243 def Name(cls):
244 return 'smoothness.gpu_rasterization.polymer'
247 class SmoothnessToughFastScrollingCases(benchmark.Benchmark):
248 test = smoothness.Smoothness
249 page_set = page_sets.ToughScrollingCasesPageSet
250 options = {'story_label_filter': 'fastscrolling'}
252 @classmethod
253 def Name(cls):
254 return 'smoothness.tough_scrolling_cases'
257 class SmoothnessImageDecodingCases(benchmark.Benchmark):
258 """Measures decoding statistics for jpeg images.
260 test = smoothness.Smoothness
261 page_set = page_sets.ImageDecodingCasesPageSet
263 def CustomizeBrowserOptions(self, options):
264 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
265 options.AppendExtraBrowserArgs('--disable-accelerated-jpeg-decoding')
267 @classmethod
268 def Name(cls):
269 return 'smoothness.image_decoding_cases'
272 class SmoothnessGpuImageDecodingCases(benchmark.Benchmark):
273 """Measures decoding statistics for jpeg images with GPU rasterization.
275 tag = 'gpu_rasterization_and_decoding'
276 test = smoothness.Smoothness
277 page_set = page_sets.ImageDecodingCasesPageSet
279 def CustomizeBrowserOptions(self, options):
280 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
281 # TODO(sugoi): Remove the following line once M41 goes stable
282 options.AppendExtraBrowserArgs('--enable-accelerated-jpeg-decoding')
284 @classmethod
285 def Name(cls):
286 return 'smoothness.gpu_rasterization_and_decoding.image_decoding_cases'
289 @benchmark.Enabled('android')
290 class SmoothnessPathologicalMobileSites(benchmark.Benchmark):
291 """Measures task execution statistics while scrolling pathological sites.
293 test = smoothness.Smoothness
294 page_set = page_sets.PathologicalMobileSitesPageSet
296 @classmethod
297 def Name(cls):
298 return 'smoothness.pathological_mobile_sites'
301 @benchmark.Enabled('android')
302 class SmoothnessSyncScrollPathologicalMobileSites(benchmark.Benchmark):
303 """Measures task execution statistics while sync-scrolling pathological sites.
305 tag = 'sync_scroll'
306 test = smoothness.Smoothness
307 page_set = page_sets.PathologicalMobileSitesPageSet
309 def CustomizeBrowserOptions(self, options):
310 silk_flags.CustomizeBrowserOptionsForSyncScrolling(options)
312 @classmethod
313 def Name(cls):
314 return 'smoothness.sync_scroll.pathological_mobile_sites'