Port Android relocation packer to chromium build
[chromium-blink-merge.git] / tools / perf / benchmarks / rasterize_and_record_micro.py
blob3b11a17db90e1223e44251e1a7fd2958bc560c50
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 @benchmark.Disabled('mac', 'win')
61 @benchmark.Disabled('reference')
62 class RasterizeAndRecordMicroTop25WithSlimmingPaint(_RasterizeAndRecordMicro):
63 """Measures rasterize and record performance with --enable-slimming-paint.
65 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
66 page_set = page_sets.Top25PageSet
68 def CustomizeBrowserOptions(self, options):
69 options.AppendExtraBrowserArgs(['--enable-slimming-paint'])
71 @classmethod
72 def Name(cls):
73 return 'rasterize_and_record_micro.top_25_slimming_paint_smooth'
76 @benchmark.Disabled('mac', 'win')
77 class RasterizeAndRecordMicroKeyMobileSites(_RasterizeAndRecordMicro):
78 """Measures rasterize and record performance on the key mobile sites.
80 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
81 page_set = page_sets.KeyMobileSitesPageSet
83 @classmethod
84 def Name(cls):
85 return 'rasterize_and_record_micro.key_mobile_sites_smooth'
88 @benchmark.Disabled('mac', 'win')
89 class RasterizeAndRecordMicroKeySilkCases(_RasterizeAndRecordMicro):
90 """Measures rasterize and record performance on the silk sites.
92 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
94 @classmethod
95 def Name(cls):
96 return 'rasterize_and_record_micro.key_silk_cases'
98 def CreatePageSet(self, options):
99 return page_sets.KeySilkCasesPageSet(run_no_page_interactions=True)
102 @benchmark.Enabled('android')
103 class RasterizeAndRecordMicroPolymer(_RasterizeAndRecordMicro):
104 """Measures rasterize and record performance on the Polymer cases.
106 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
108 @classmethod
109 def Name(cls):
110 return 'rasterize_and_record_micro.polymer'
112 def CreatePageSet(self, options):
113 return page_sets.PolymerPageSet(run_no_page_interactions=True)