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 measurements
import rasterize_and_record_micro
11 class _RasterizeAndRecordMicro(benchmark
.Benchmark
):
13 def AddBenchmarkCommandLineArgs(cls
, parser
):
14 parser
.add_option('--start-wait-time', type='float',
16 help='Wait time before the benchmark is started '
17 '(must be long enought to load all content)')
18 parser
.add_option('--rasterize-repeat', type='int',
20 help='Repeat each raster this many times. Increase '
21 'this value to reduce variance.')
22 parser
.add_option('--record-repeat', type='int',
24 help='Repeat each record this many times. Increase '
25 'this value to reduce variance.')
26 parser
.add_option('--timeout', type='int',
28 help='The length of time to wait for the micro '
29 'benchmark to finish, expressed in seconds.')
30 parser
.add_option('--report-detailed-results',
32 help='Whether to report additional detailed results.')
36 return 'rasterize_and_record_micro'
38 def CreatePageTest(self
, options
):
39 return rasterize_and_record_micro
.RasterizeAndRecordMicro(
40 options
.start_wait_time
, options
.rasterize_repeat
,
41 options
.record_repeat
, options
.timeout
, options
.report_detailed_results
)
44 # RasterizeAndRecord disabled on mac because of crbug.com/350684.
45 # RasterizeAndRecord disabled on windows because of crbug.com/338057.
46 @benchmark.Disabled('mac', 'win')
47 class RasterizeAndRecordMicroTop25(_RasterizeAndRecordMicro
):
48 """Measures rasterize and record performance on the top 25 web pages.
50 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
51 page_set
= page_sets
.Top25PageSet
55 return 'rasterize_and_record_micro.top_25_smooth'
58 # RasterizeAndRecord disabled on mac because of crbug.com/350684.
59 # RasterizeAndRecord disabled on windows because of crbug.com/338057.
60 # Slimming paint version disabled on android because of crbug.com/472590.
61 @benchmark.Disabled('mac', 'win', 'android')
62 @benchmark.Disabled('reference')
63 class RasterizeAndRecordMicroTop25WithSlimmingPaint(_RasterizeAndRecordMicro
):
64 """Measures rasterize and record performance with --enable-slimming-paint.
66 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
67 page_set
= page_sets
.Top25PageSet
69 def CustomizeBrowserOptions(self
, options
):
70 options
.AppendExtraBrowserArgs(['--enable-slimming-paint'])
74 return 'rasterize_and_record_micro.top_25_slimming_paint_smooth'
77 @benchmark.Disabled('mac', 'win')
78 class RasterizeAndRecordMicroKeyMobileSites(_RasterizeAndRecordMicro
):
79 """Measures rasterize and record performance on the key mobile sites.
81 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
82 page_set
= page_sets
.KeyMobileSitesPageSet
86 return 'rasterize_and_record_micro.key_mobile_sites_smooth'
89 @benchmark.Disabled('mac', 'win')
90 class RasterizeAndRecordMicroKeySilkCases(_RasterizeAndRecordMicro
):
91 """Measures rasterize and record performance on the silk sites.
93 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
97 return 'rasterize_and_record_micro.key_silk_cases'
99 def CreatePageSet(self
, options
):
100 return page_sets
.KeySilkCasesPageSet(run_no_page_interactions
=True)
103 @benchmark.Enabled('android')
104 class RasterizeAndRecordMicroPolymer(_RasterizeAndRecordMicro
):
105 """Measures rasterize and record performance on the Polymer cases.
107 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
111 return 'rasterize_and_record_micro.polymer'
113 def CreatePageSet(self
, options
):
114 return page_sets
.PolymerPageSet(run_no_page_interactions
=True)