OLD | NEW |
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 core import perf_benchmark | 5 from core import perf_benchmark |
6 | 6 |
7 from benchmarks import silk_flags | |
8 import ct_benchmarks_util | 7 import ct_benchmarks_util |
9 from measurements import smoothness | 8 from measurements import smoothness |
10 | 9 |
11 import page_sets | 10 import page_sets |
12 from page_sets import repaint_helpers | 11 from page_sets import repaint_helpers |
13 | 12 |
14 from telemetry import benchmark | 13 from telemetry import benchmark |
15 | 14 |
| 15 # Disabled because we do not plan on running CT benchmarks on the perf |
| 16 # waterfall any time soon. |
| 17 @benchmark.Disabled('all') |
| 18 class RepaintCT(perf_benchmark.PerfBenchmark): |
| 19 """Measures repaint performance for Cluster Telemetry.""" |
16 | 20 |
17 class _Repaint(perf_benchmark.PerfBenchmark): | 21 @classmethod |
| 22 def Name(cls): |
| 23 return 'repaint_ct' |
18 | 24 |
19 @classmethod | 25 @classmethod |
20 def AddBenchmarkCommandLineArgs(cls, parser): | 26 def AddBenchmarkCommandLineArgs(cls, parser): |
21 parser.add_option('--mode', type='string', | 27 parser.add_option('--mode', type='string', |
22 default='viewport', | 28 default='viewport', |
23 help='Invalidation mode. ' | 29 help='Invalidation mode. ' |
24 'Supported values: fixed_size, layer, random, viewport.') | 30 'Supported values: fixed_size, layer, random, viewport.') |
25 parser.add_option('--width', type='int', | 31 parser.add_option('--width', type='int', |
26 default=None, | 32 default=None, |
27 help='Width of invalidations for fixed_size mode.') | 33 help='Width of invalidations for fixed_size mode.') |
28 parser.add_option('--height', type='int', | 34 parser.add_option('--height', type='int', |
29 default=None, | 35 default=None, |
30 help='Height of invalidations for fixed_size mode.') | 36 help='Height of invalidations for fixed_size mode.') |
31 | |
32 @classmethod | |
33 def Name(cls): | |
34 return 'repaint' | |
35 | |
36 def CreateStorySet(self, options): | |
37 return page_sets.KeyMobileSitesRepaintPageSet( | |
38 options.mode, options.width, options.height) | |
39 | |
40 def CreatePageTest(self, options): | |
41 return smoothness.Repaint() | |
42 | |
43 # crbug.com/499320 | |
44 #@benchmark.Enabled('android') | |
45 | |
46 | |
47 @benchmark.Disabled('all') | |
48 @benchmark.Owner(emails=['wkorman@chromium.org', 'vmpstr@chromium.org']) | |
49 class RepaintKeyMobileSites(_Repaint): | |
50 """Measures repaint performance on the key mobile sites. | |
51 | |
52 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | |
53 | |
54 @classmethod | |
55 def Name(cls): | |
56 return 'repaint.key_mobile_sites_repaint' | |
57 | |
58 | |
59 # crbug.com/502179 | |
60 @benchmark.Enabled('android') | |
61 @benchmark.Disabled('all') | |
62 @benchmark.Owner(emails=['wkorman@chromium.org', 'vmpstr@chromium.org']) | |
63 class RepaintGpuRasterizationKeyMobileSites(_Repaint): | |
64 """Measures repaint performance on the key mobile sites with forced GPU | |
65 rasterization. | |
66 | |
67 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | |
68 tag = 'gpu_rasterization' | |
69 | |
70 def SetExtraBrowserOptions(self, options): | |
71 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
72 | |
73 @classmethod | |
74 def Name(cls): | |
75 return 'repaint.gpu_rasterization.key_mobile_sites_repaint' | |
76 | |
77 | |
78 # Disabled because we do not plan on running CT benchmarks on the perf | |
79 # waterfall any time soon. | |
80 @benchmark.Disabled('all') | |
81 class RepaintCT(_Repaint): | |
82 """Measures repaint performance for Cluster Telemetry.""" | |
83 | |
84 @classmethod | |
85 def Name(cls): | |
86 return 'repaint_ct' | |
87 | |
88 @classmethod | |
89 def AddBenchmarkCommandLineArgs(cls, parser): | |
90 _Repaint.AddBenchmarkCommandLineArgs(parser) | |
91 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) | 37 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) |
92 | 38 |
93 @classmethod | 39 @classmethod |
94 def ProcessCommandLineArgs(cls, parser, args): | 40 def ProcessCommandLineArgs(cls, parser, args): |
95 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) | 41 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) |
96 | 42 |
97 def CreateStorySet(self, options): | 43 def CreateStorySet(self, options): |
98 return page_sets.CTPageSet( | 44 return page_sets.CTPageSet( |
99 options.urls_list, options.user_agent, options.archive_data_file, | 45 options.urls_list, options.user_agent, options.archive_data_file, |
100 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) | 46 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) |
| 47 |
| 48 def CreatePageTest(self, options): |
| 49 return smoothness.Repaint() |
OLD | NEW |