[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / tools / perf / benchmarks / rasterize_and_record_micro.py
blob9a5ababf4d34e1252feed93313e8001a57e20653
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
8 import page_sets
9 from telemetry import benchmark
12 class _RasterizeAndRecordMicro(perf_benchmark.PerfBenchmark):
13 @classmethod
14 def AddBenchmarkCommandLineArgs(cls, parser):
15 parser.add_option('--start-wait-time', type='float',
16 default=2,
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',
20 default=100,
21 help='Repeat each raster this many times. Increase '
22 'this value to reduce variance.')
23 parser.add_option('--record-repeat', type='int',
24 default=100,
25 help='Repeat each record this many times. Increase '
26 'this value to reduce variance.')
27 parser.add_option('--timeout', type='int',
28 default=120,
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',
32 action='store_true',
33 help='Whether to report additional detailed results.')
35 @classmethod
36 def Name(cls):
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
54 @classmethod
55 def Name(cls):
56 return 'rasterize_and_record_micro.top_25_smooth'
59 @benchmark.Disabled('mac', 'win',
60 'android') # http://crbug.com/531597
61 class RasterizeAndRecordMicroKeyMobileSites(_RasterizeAndRecordMicro):
62 """Measures rasterize and record performance on the key mobile sites.
64 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
65 page_set = page_sets.KeyMobileSitesPageSet
67 @classmethod
68 def Name(cls):
69 return 'rasterize_and_record_micro.key_mobile_sites_smooth'
72 @benchmark.Disabled('mac', 'win')
73 class RasterizeAndRecordMicroKeySilkCases(_RasterizeAndRecordMicro):
74 """Measures rasterize and record performance on the silk sites.
76 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
78 @classmethod
79 def Name(cls):
80 return 'rasterize_and_record_micro.key_silk_cases'
82 def CreateStorySet(self, options):
83 return page_sets.KeySilkCasesPageSet(run_no_page_interactions=True)
86 @benchmark.Enabled('android')
87 class RasterizeAndRecordMicroPolymer(_RasterizeAndRecordMicro):
88 """Measures rasterize and record performance on the Polymer cases.
90 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
92 @classmethod
93 def Name(cls):
94 return 'rasterize_and_record_micro.polymer'
96 def CreateStorySet(self, options):
97 return page_sets.PolymerPageSet(run_no_page_interactions=True)