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

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

Issue 1359473003: Enable GPU rasterization for more telemetry tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « no previous file | tools/perf/benchmarks/smoothness.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 core import perf_benchmark 5 from core import perf_benchmark
6 6
7 from benchmarks import silk_flags 7 from benchmarks import silk_flags
8 from measurements import power 8 from measurements import power
9 import page_sets 9 import page_sets
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 test = power.QuiescentPower 74 test = power.QuiescentPower
75 page_set = page_sets.Top10PageSet 75 page_set = page_sets.Top10PageSet
76 76
77 def SetExtraBrowserOptions(self, options): 77 def SetExtraBrowserOptions(self, options):
78 options.full_performance_mode = False 78 options.full_performance_mode = False
79 79
80 @classmethod 80 @classmethod
81 def Name(cls): 81 def Name(cls):
82 return 'power.top_10' 82 return 'power.top_10'
83 83
84 @benchmark.Enabled('mac')
85 class PowerGpuRasterizationTop10(perf_benchmark.PerfBenchmark):
86 """Top 10 quiescent power test with GPU rasterization enabled."""
87 tag = 'gpu_rasterization'
88 test = power.QuiescentPower
89 page_set = page_sets.Top10PageSet
90
91 def SetExtraBrowserOptions(self, options):
92 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
93 options.full_performance_mode = False
94
95 @classmethod
96 def Name(cls):
97 return 'power.gpu_rasterization.top_10'
98
84 99
85 @benchmark.Enabled('mac') 100 @benchmark.Enabled('mac')
86 class PowerTop25(perf_benchmark.PerfBenchmark): 101 class PowerTop25(perf_benchmark.PerfBenchmark):
87 """Top 25 quiescent power test.""" 102 """Top 25 quiescent power test."""
88 test = power.QuiescentPower 103 test = power.QuiescentPower
89 page_set = page_sets.Top25PageSet 104 page_set = page_sets.Top25PageSet
90 105
91 def SetExtraBrowserOptions(self, options): 106 def SetExtraBrowserOptions(self, options):
92 options.full_performance_mode = False 107 options.full_performance_mode = False
93 108
94 @classmethod 109 @classmethod
95 def Name(cls): 110 def Name(cls):
96 return 'power.top_25' 111 return 'power.top_25'
97 112
98 def CreateStorySet(self, _): 113 def CreateStorySet(self, _):
99 # Exclude techcrunch.com. It is not suitable for this benchmark because it 114 # Exclude techcrunch.com. It is not suitable for this benchmark because it
100 # does not consistently become quiescent within 60 seconds. 115 # does not consistently become quiescent within 60 seconds.
101 stories = self.page_set() 116 stories = self.page_set()
102 found = next((x for x in stories if 'techcrunch.com' in x.url), None) 117 found = next((x for x in stories if 'techcrunch.com' in x.url), None)
103 if found: 118 if found:
104 stories.RemoveStory(found) 119 stories.RemoveStory(found)
105 return stories 120 return stories
106 121
122 @benchmark.Enabled('mac')
123 class PowerGpuRasterizationTop25(perf_benchmark.PerfBenchmark):
124 """Top 25 quiescent power test with GPU rasterization enabled."""
125 tag = 'gpu_rasterization'
126 test = power.QuiescentPower
127 page_set = page_sets.Top25PageSet
128
129 def SetExtraBrowserOptions(self, options):
130 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
131 options.full_performance_mode = False
132
133 @classmethod
134 def Name(cls):
135 return 'power.gpu_rasterization.top_25'
136
137 def CreateStorySet(self, _):
138 # Exclude techcrunch.com. It is not suitable for this benchmark because it
139 # does not consistently become quiescent within 60 seconds.
140 stories = self.page_set()
141 found = next((x for x in stories if 'techcrunch.com' in x.url), None)
142 if found:
143 stories.RemoveStory(found)
144 return stories
107 145
108 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') 146 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
109 class PowerPPSControlDisabled(perf_benchmark.PerfBenchmark): 147 class PowerPPSControlDisabled(perf_benchmark.PerfBenchmark):
110 """A single page with a small-ish non-essential plugin. In this test, Plugin 148 """A single page with a small-ish non-essential plugin. In this test, Plugin
111 Power Saver (PPS) is disabled, so the plugin should continue animating and 149 Power Saver (PPS) is disabled, so the plugin should continue animating and
112 taking power.""" 150 taking power."""
113 test = power.QuiescentPower 151 test = power.QuiescentPower
114 page_set = page_sets.PluginPowerSaverPageSet 152 page_set = page_sets.PluginPowerSaverPageSet
115 options = {'pageset_repeat': 5} 153 options = {'pageset_repeat': 5}
116 154
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 page_set = page_sets.ThrottledPluginsPageSet 204 page_set = page_sets.ThrottledPluginsPageSet
167 options = {'pageset_repeat': 5} 205 options = {'pageset_repeat': 5}
168 206
169 def SetExtraBrowserOptions(self, options): 207 def SetExtraBrowserOptions(self, options):
170 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) 208 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver'])
171 options.full_performance_mode = False 209 options.full_performance_mode = False
172 210
173 @classmethod 211 @classmethod
174 def Name(cls): 212 def Name(cls):
175 return 'power.throttled_plugins_pps_enabled' 213 return 'power.throttled_plugins_pps_enabled'
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/smoothness.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698