Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tools/perf/benchmarks/repaint.py

Issue 816353008: [Telemetry] Explicitly define Name() method for all perf benchmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from benchmarks import silk_flags 5 from benchmarks import silk_flags
6 from measurements import repaint as repaint_measurement 6 from measurements import repaint as repaint_measurement
7 import page_sets 7 import page_sets
8 from telemetry import benchmark 8 from telemetry import benchmark
9 9
10 10
11 class _Repaint(benchmark.Benchmark): 11 class _Repaint(benchmark.Benchmark):
12 @classmethod 12 @classmethod
13 def AddBenchmarkCommandLineArgs(cls, parser): 13 def AddBenchmarkCommandLineArgs(cls, parser):
14 parser.add_option('--mode', type='string', 14 parser.add_option('--mode', type='string',
15 default='viewport', 15 default='viewport',
16 help='Invalidation mode. ' 16 help='Invalidation mode. '
17 'Supported values: fixed_size, layer, random, viewport.') 17 'Supported values: fixed_size, layer, random, viewport.')
18 parser.add_option('--width', type='int', 18 parser.add_option('--width', type='int',
19 default=None, 19 default=None,
20 help='Width of invalidations for fixed_size mode.') 20 help='Width of invalidations for fixed_size mode.')
21 parser.add_option('--height', type='int', 21 parser.add_option('--height', type='int',
22 default=None, 22 default=None,
23 help='Height of invalidations for fixed_size mode.') 23 help='Height of invalidations for fixed_size mode.')
24 24
25 @classmethod
26 def Name(cls):
27 return 'repaint'
28
25 def CreatePageTest(self, options): 29 def CreatePageTest(self, options):
26 return repaint_measurement.Repaint(options.mode, options.width, 30 return repaint_measurement.Repaint(options.mode, options.width,
27 options.height) 31 options.height)
28 32
29 @benchmark.Enabled('android') 33 @benchmark.Enabled('android')
30 class RepaintKeyMobileSites(_Repaint): 34 class RepaintKeyMobileSites(_Repaint):
31 """Measures repaint performance on the key mobile sites. 35 """Measures repaint performance on the key mobile sites.
32 36
33 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" 37 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
34 page_set = page_sets.KeyMobileSitesRepaintPageSet 38 page_set = page_sets.KeyMobileSitesRepaintPageSet
35 39
40 @classmethod
41 def Name(cls):
42 return 'repaint.key_mobile_sites_repaint'
43
36 44
37 @benchmark.Enabled('android') 45 @benchmark.Enabled('android')
38 class RepaintGpuRasterizationKeyMobileSites(_Repaint): 46 class RepaintGpuRasterizationKeyMobileSites(_Repaint):
39 """Measures repaint performance on the key mobile sites with forced GPU 47 """Measures repaint performance on the key mobile sites with forced GPU
40 rasterization. 48 rasterization.
41 49
42 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" 50 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
43 tag = 'gpu_rasterization' 51 tag = 'gpu_rasterization'
44 page_set = page_sets.KeyMobileSitesRepaintPageSet 52 page_set = page_sets.KeyMobileSitesRepaintPageSet
45 def CustomizeBrowserOptions(self, options): 53 def CustomizeBrowserOptions(self, options):
46 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) 54 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
55 @classmethod
56 def Name(cls):
57 return 'repaint.gpu_rasterization.key_mobile_sites_repaint'
58
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698