[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / tools / perf / benchmarks / rasterize_and_record_micro.py
blobe7eba0e94d4466c473eac7d888072af769687cde
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
8 import page_sets
11 class _RasterizeAndRecordMicro(benchmark.Benchmark):
12 @classmethod
13 def AddBenchmarkCommandLineArgs(cls, parser):
14 parser.add_option('--start-wait-time', type='float',
15 default=2,
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',
19 default=100,
20 help='Repeat each raster this many times. Increase '
21 'this value to reduce variance.')
22 parser.add_option('--record-repeat', type='int',
23 default=100,
24 help='Repeat each record this many times. Increase '
25 'this value to reduce variance.')
26 parser.add_option('--timeout', type='int',
27 default=120,
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',
31 action='store_true',
32 help='Whether to report additional detailed results.')
34 @classmethod
35 def Name(cls):
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
53 @classmethod
54 def Name(cls):
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'])
72 @classmethod
73 def Name(cls):
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
84 @classmethod
85 def Name(cls):
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"""
95 @classmethod
96 def Name(cls):
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"""
109 @classmethod
110 def Name(cls):
111 return 'rasterize_and_record_micro.polymer'
113 def CreatePageSet(self, options):
114 return page_sets.PolymerPageSet(run_no_page_interactions=True)