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 core
import perf_benchmark
7 from measurements
import rasterize_and_record_micro
9 from telemetry
import benchmark
12 class _RasterizeAndRecordMicro(perf_benchmark
.PerfBenchmark
):
14 def AddBenchmarkCommandLineArgs(cls
, parser
):
15 parser
.add_option('--start-wait-time', type='float',
17 help='Wait time before the benchmark is started '
18 '(must be long enought to load all content)')
19 parser
.add_option('--rasterize-repeat', type='int',
21 help='Repeat each raster this many times. Increase '
22 'this value to reduce variance.')
23 parser
.add_option('--record-repeat', type='int',
25 help='Repeat each record this many times. Increase '
26 'this value to reduce variance.')
27 parser
.add_option('--timeout', type='int',
29 help='The length of time to wait for the micro '
30 'benchmark to finish, expressed in seconds.')
31 parser
.add_option('--report-detailed-results',
33 help='Whether to report additional detailed results.')
37 return 'rasterize_and_record_micro'
39 def CreatePageTest(self
, options
):
40 return rasterize_and_record_micro
.RasterizeAndRecordMicro(
41 options
.start_wait_time
, options
.rasterize_repeat
,
42 options
.record_repeat
, options
.timeout
, options
.report_detailed_results
)
45 # RasterizeAndRecord disabled on mac because of crbug.com/350684.
46 # RasterizeAndRecord disabled on windows because of crbug.com/338057.
47 @benchmark.Disabled('mac', 'win')
48 class RasterizeAndRecordMicroTop25(_RasterizeAndRecordMicro
):
49 """Measures rasterize and record performance on the top 25 web pages.
51 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
52 page_set
= page_sets
.Top25PageSet
56 return 'rasterize_and_record_micro.top_25_smooth'
59 @benchmark.Disabled('mac', 'win')
60 class RasterizeAndRecordMicroKeyMobileSites(_RasterizeAndRecordMicro
):
61 """Measures rasterize and record performance on the key mobile sites.
63 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
64 page_set
= page_sets
.KeyMobileSitesPageSet
68 return 'rasterize_and_record_micro.key_mobile_sites_smooth'
71 @benchmark.Disabled('mac', 'win')
72 class RasterizeAndRecordMicroKeySilkCases(_RasterizeAndRecordMicro
):
73 """Measures rasterize and record performance on the silk sites.
75 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
79 return 'rasterize_and_record_micro.key_silk_cases'
81 def CreateStorySet(self
, options
):
82 return page_sets
.KeySilkCasesPageSet(run_no_page_interactions
=True)
85 @benchmark.Enabled('android')
86 class RasterizeAndRecordMicroPolymer(_RasterizeAndRecordMicro
):
87 """Measures rasterize and record performance on the Polymer cases.
89 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
93 return 'rasterize_and_record_micro.polymer'
95 def CreateStorySet(self
, options
):
96 return page_sets
.PolymerPageSet(run_no_page_interactions
=True)