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

Side by Side Diff: tools/perf/benchmarks/blink_perf.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 2013 The Chromium Authors. All rights reserved. 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 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 import os 5 import os
6 6
7 from telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry import page as page_module 8 from telemetry import page as page_module
9 from telemetry.core import util 9 from telemetry.core import util
10 from telemetry.page import page_set 10 from telemetry.page import page_set
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 options) 112 options)
113 # Full layout measurement needs content_shell with internals testing API. 113 # Full layout measurement needs content_shell with internals testing API.
114 assert 'content-shell' in options.browser_type 114 assert 'content-shell' in options.browser_type
115 options.AppendExtraBrowserArgs(['--expose-internals-for-testing']) 115 options.AppendExtraBrowserArgs(['--expose-internals-for-testing'])
116 116
117 117
118 class BlinkPerfAnimation(benchmark.Benchmark): 118 class BlinkPerfAnimation(benchmark.Benchmark):
119 tag = 'animation' 119 tag = 'animation'
120 test = _BlinkPerfMeasurement 120 test = _BlinkPerfMeasurement
121 121
122 @classmethod
123 def Name(cls):
124 return 'blink_perf.animation'
125
122 def CreatePageSet(self, options): 126 def CreatePageSet(self, options):
123 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation') 127 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation')
124 return CreatePageSetFromPath(path, SKIPPED_FILE) 128 return CreatePageSetFromPath(path, SKIPPED_FILE)
125 129
126 130
127 class BlinkPerfBindings(benchmark.Benchmark): 131 class BlinkPerfBindings(benchmark.Benchmark):
128 tag = 'bindings' 132 tag = 'bindings'
129 test = _BlinkPerfMeasurement 133 test = _BlinkPerfMeasurement
130 134
135 @classmethod
136 def Name(cls):
137 return 'blink_perf.bindings'
138
131 def CreatePageSet(self, options): 139 def CreatePageSet(self, options):
132 path = os.path.join(BLINK_PERF_BASE_DIR, 'Bindings') 140 path = os.path.join(BLINK_PERF_BASE_DIR, 'Bindings')
133 return CreatePageSetFromPath(path, SKIPPED_FILE) 141 return CreatePageSetFromPath(path, SKIPPED_FILE)
134 142
135 143
136 @benchmark.Enabled('content-shell') 144 @benchmark.Enabled('content-shell')
137 class BlinkPerfBlinkGC(benchmark.Benchmark): 145 class BlinkPerfBlinkGC(benchmark.Benchmark):
138 tag = 'blink_gc' 146 tag = 'blink_gc'
139 test = _BlinkPerfMeasurement 147 test = _BlinkPerfMeasurement
140 148
149 @classmethod
150 def Name(cls):
151 return 'blink_perf.blink_gc'
152
141 def CreatePageSet(self, options): 153 def CreatePageSet(self, options):
142 path = os.path.join(BLINK_PERF_BASE_DIR, 'BlinkGC') 154 path = os.path.join(BLINK_PERF_BASE_DIR, 'BlinkGC')
143 return CreatePageSetFromPath(path, SKIPPED_FILE) 155 return CreatePageSetFromPath(path, SKIPPED_FILE)
144 156
145 157
146 class BlinkPerfCSS(benchmark.Benchmark): 158 class BlinkPerfCSS(benchmark.Benchmark):
147 tag = 'css' 159 tag = 'css'
148 test = _BlinkPerfMeasurement 160 test = _BlinkPerfMeasurement
149 161
162 @classmethod
163 def Name(cls):
164 return 'blink_perf.css'
165
150 def CreatePageSet(self, options): 166 def CreatePageSet(self, options):
151 path = os.path.join(BLINK_PERF_BASE_DIR, 'CSS') 167 path = os.path.join(BLINK_PERF_BASE_DIR, 'CSS')
152 return CreatePageSetFromPath(path, SKIPPED_FILE) 168 return CreatePageSetFromPath(path, SKIPPED_FILE)
153 169
154 170
155 class BlinkPerfCanvas(benchmark.Benchmark): 171 class BlinkPerfCanvas(benchmark.Benchmark):
156 tag = 'canvas' 172 tag = 'canvas'
157 test = _BlinkPerfMeasurement 173 test = _BlinkPerfMeasurement
158 174
175 @classmethod
176 def Name(cls):
177 return 'blink_perf.canvas'
178
159 def CreatePageSet(self, options): 179 def CreatePageSet(self, options):
160 path = os.path.join(BLINK_PERF_BASE_DIR, 'Canvas') 180 path = os.path.join(BLINK_PERF_BASE_DIR, 'Canvas')
161 return CreatePageSetFromPath(path, SKIPPED_FILE) 181 return CreatePageSetFromPath(path, SKIPPED_FILE)
162 182
163 183
164 class BlinkPerfDOM(benchmark.Benchmark): 184 class BlinkPerfDOM(benchmark.Benchmark):
165 tag = 'dom' 185 tag = 'dom'
166 test = _BlinkPerfMeasurement 186 test = _BlinkPerfMeasurement
167 187
188 @classmethod
189 def Name(cls):
190 return 'blink_perf.dom'
191
168 def CreatePageSet(self, options): 192 def CreatePageSet(self, options):
169 path = os.path.join(BLINK_PERF_BASE_DIR, 'DOM') 193 path = os.path.join(BLINK_PERF_BASE_DIR, 'DOM')
170 return CreatePageSetFromPath(path, SKIPPED_FILE) 194 return CreatePageSetFromPath(path, SKIPPED_FILE)
171 195
172 196
173 class BlinkPerfEvents(benchmark.Benchmark): 197 class BlinkPerfEvents(benchmark.Benchmark):
174 tag = 'events' 198 tag = 'events'
175 test = _BlinkPerfMeasurement 199 test = _BlinkPerfMeasurement
176 200
201 @classmethod
202 def Name(cls):
203 return 'blink_perf.events'
204
177 def CreatePageSet(self, options): 205 def CreatePageSet(self, options):
178 path = os.path.join(BLINK_PERF_BASE_DIR, 'Events') 206 path = os.path.join(BLINK_PERF_BASE_DIR, 'Events')
179 return CreatePageSetFromPath(path, SKIPPED_FILE) 207 return CreatePageSetFromPath(path, SKIPPED_FILE)
180 208
181 209
182 class BlinkPerfLayout(benchmark.Benchmark): 210 class BlinkPerfLayout(benchmark.Benchmark):
183 tag = 'layout' 211 tag = 'layout'
184 test = _BlinkPerfMeasurement 212 test = _BlinkPerfMeasurement
185 213
214 @classmethod
215 def Name(cls):
216 return 'blink_perf.layout'
217
186 def CreatePageSet(self, options): 218 def CreatePageSet(self, options):
187 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout') 219 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout')
188 return CreatePageSetFromPath(path, SKIPPED_FILE) 220 return CreatePageSetFromPath(path, SKIPPED_FILE)
189 221
190 222
191 @benchmark.Enabled('content-shell') 223 @benchmark.Enabled('content-shell')
192 class BlinkPerfLayoutFullLayout(BlinkPerfLayout): 224 class BlinkPerfLayoutFullLayout(BlinkPerfLayout):
193 tag = 'layout_full_frame' 225 tag = 'layout_full_frame'
194 test = _BlinkPerfFullFrameMeasurement 226 test = _BlinkPerfFullFrameMeasurement
195 227
228 @classmethod
229 def Name(cls):
230 return 'blink_perf.layout_full_frame'
231
196 232
197 class BlinkPerfMutation(benchmark.Benchmark): 233 class BlinkPerfMutation(benchmark.Benchmark):
198 tag = 'mutation' 234 tag = 'mutation'
199 test = _BlinkPerfMeasurement 235 test = _BlinkPerfMeasurement
200 236
237 @classmethod
238 def Name(cls):
239 return 'blink_perf.mutation'
240
201 def CreatePageSet(self, options): 241 def CreatePageSet(self, options):
202 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation') 242 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation')
203 return CreatePageSetFromPath(path, SKIPPED_FILE) 243 return CreatePageSetFromPath(path, SKIPPED_FILE)
204 244
205 245
206 class BlinkPerfParser(benchmark.Benchmark): 246 class BlinkPerfParser(benchmark.Benchmark):
207 tag = 'parser' 247 tag = 'parser'
208 test = _BlinkPerfMeasurement 248 test = _BlinkPerfMeasurement
209 249
250 @classmethod
251 def Name(cls):
252 return 'blink_perf.parser'
253
210 def CreatePageSet(self, options): 254 def CreatePageSet(self, options):
211 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') 255 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser')
212 return CreatePageSetFromPath(path, SKIPPED_FILE) 256 return CreatePageSetFromPath(path, SKIPPED_FILE)
213 257
214 258
215 class BlinkPerfSVG(benchmark.Benchmark): 259 class BlinkPerfSVG(benchmark.Benchmark):
216 tag = 'svg' 260 tag = 'svg'
217 test = _BlinkPerfMeasurement 261 test = _BlinkPerfMeasurement
218 262
263 @classmethod
264 def Name(cls):
265 return 'blink_perf.svg'
266
219 def CreatePageSet(self, options): 267 def CreatePageSet(self, options):
220 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') 268 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG')
221 return CreatePageSetFromPath(path, SKIPPED_FILE) 269 return CreatePageSetFromPath(path, SKIPPED_FILE)
222 270
223 271
224 @benchmark.Enabled('content-shell') 272 @benchmark.Enabled('content-shell')
225 class BlinkPerfSVGFullLayout(BlinkPerfSVG): 273 class BlinkPerfSVGFullLayout(BlinkPerfSVG):
226 tag = 'svg_full_frame' 274 tag = 'svg_full_frame'
227 test = _BlinkPerfFullFrameMeasurement 275 test = _BlinkPerfFullFrameMeasurement
228 276
277 @classmethod
278 def Name(cls):
279 return 'blink_perf.svg_full_frame'
280
229 281
230 class BlinkPerfShadowDOM(benchmark.Benchmark): 282 class BlinkPerfShadowDOM(benchmark.Benchmark):
231 tag = 'shadow_dom' 283 tag = 'shadow_dom'
232 test = _BlinkPerfMeasurement 284 test = _BlinkPerfMeasurement
233 285
286 @classmethod
287 def Name(cls):
288 return 'blink_perf.shadow_dom'
289
234 def CreatePageSet(self, options): 290 def CreatePageSet(self, options):
235 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') 291 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM')
236 return CreatePageSetFromPath(path, SKIPPED_FILE) 292 return CreatePageSetFromPath(path, SKIPPED_FILE)
237 293
238 294
239 # This benchmark is for local testing, doesn't need to run on bots. 295 # This benchmark is for local testing, doesn't need to run on bots.
240 @benchmark.Disabled() 296 @benchmark.Disabled()
241 class BlinkPerfXMLHttpRequest(benchmark.Benchmark): 297 class BlinkPerfXMLHttpRequest(benchmark.Benchmark):
242 tag = 'xml_http_request' 298 tag = 'xml_http_request'
243 test = _BlinkPerfMeasurement 299 test = _BlinkPerfMeasurement
244 300
301 @classmethod
302 def Name(cls):
303 return 'blink_perf.xml_http_request'
304
245 def CreatePageSet(self, options): 305 def CreatePageSet(self, options):
246 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') 306 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest')
247 return CreatePageSetFromPath(path, SKIPPED_FILE) 307 return CreatePageSetFromPath(path, SKIPPED_FILE)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698