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 |
16 | 15 |
17 class _Repaint(perf_benchmark.PerfBenchmark): | 16 class _Repaint(perf_benchmark.PerfBenchmark): |
nednguyen
2017/05/11 16:29:51
nits: this can be merged into RepaintCT as it's th
wkorman
2017/05/11 17:52:05
Done, which also means we have no remaining use of
| |
18 | 17 |
19 @classmethod | 18 @classmethod |
20 def AddBenchmarkCommandLineArgs(cls, parser): | 19 def AddBenchmarkCommandLineArgs(cls, parser): |
21 parser.add_option('--mode', type='string', | 20 parser.add_option('--mode', type='string', |
22 default='viewport', | 21 default='viewport', |
23 help='Invalidation mode. ' | 22 help='Invalidation mode. ' |
24 'Supported values: fixed_size, layer, random, viewport.') | 23 'Supported values: fixed_size, layer, random, viewport.') |
25 parser.add_option('--width', type='int', | 24 parser.add_option('--width', type='int', |
26 default=None, | 25 default=None, |
27 help='Width of invalidations for fixed_size mode.') | 26 help='Width of invalidations for fixed_size mode.') |
28 parser.add_option('--height', type='int', | 27 parser.add_option('--height', type='int', |
29 default=None, | 28 default=None, |
30 help='Height of invalidations for fixed_size mode.') | 29 help='Height of invalidations for fixed_size mode.') |
31 | 30 |
32 @classmethod | 31 @classmethod |
33 def Name(cls): | 32 def Name(cls): |
34 return 'repaint' | 33 return 'repaint' |
35 | 34 |
36 def CreateStorySet(self, options): | 35 def CreateStorySet(self, options): |
37 return page_sets.KeyMobileSitesRepaintPageSet( | 36 return page_sets.KeyMobileSitesRepaintPageSet( |
38 options.mode, options.width, options.height) | 37 options.mode, options.width, options.height) |
39 | 38 |
40 def CreatePageTest(self, options): | 39 def CreatePageTest(self, options): |
41 return smoothness.Repaint() | 40 return smoothness.Repaint() |
42 | 41 |
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 | 42 |
78 # Disabled because we do not plan on running CT benchmarks on the perf | 43 # Disabled because we do not plan on running CT benchmarks on the perf |
79 # waterfall any time soon. | 44 # waterfall any time soon. |
80 @benchmark.Disabled('all') | 45 @benchmark.Disabled('all') |
81 class RepaintCT(_Repaint): | 46 class RepaintCT(_Repaint): |
82 """Measures repaint performance for Cluster Telemetry.""" | 47 """Measures repaint performance for Cluster Telemetry.""" |
83 | 48 |
84 @classmethod | 49 @classmethod |
85 def Name(cls): | 50 def Name(cls): |
86 return 'repaint_ct' | 51 return 'repaint_ct' |
87 | 52 |
88 @classmethod | 53 @classmethod |
89 def AddBenchmarkCommandLineArgs(cls, parser): | 54 def AddBenchmarkCommandLineArgs(cls, parser): |
90 _Repaint.AddBenchmarkCommandLineArgs(parser) | 55 _Repaint.AddBenchmarkCommandLineArgs(parser) |
91 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) | 56 ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) |
92 | 57 |
93 @classmethod | 58 @classmethod |
94 def ProcessCommandLineArgs(cls, parser, args): | 59 def ProcessCommandLineArgs(cls, parser, args): |
95 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) | 60 ct_benchmarks_util.ValidateCommandLineArgs(parser, args) |
96 | 61 |
97 def CreateStorySet(self, options): | 62 def CreateStorySet(self, options): |
98 return page_sets.CTPageSet( | 63 return page_sets.CTPageSet( |
99 options.urls_list, options.user_agent, options.archive_data_file, | 64 options.urls_list, options.user_agent, options.archive_data_file, |
100 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) | 65 run_page_interaction_callback=repaint_helpers.WaitThenRepaint) |
OLD | NEW |