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

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

Issue 2868183002: Fix breakage when blink_perf benchmarks are run without --browser flag (Closed)
Patch Set: Fix BlinkPerf default value Created 3 years, 7 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 core import path_util 7 from core import path_util
8 from core import perf_benchmark 8 from core import perf_benchmark
9 9
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 '--disable-gesture-requirement-for-media-playback', 159 '--disable-gesture-requirement-for-media-playback',
160 # should be used until every build from 160 # should be used until every build from
161 # ToT to Stable switches over to one flag or another. This is to support 161 # ToT to Stable switches over to one flag or another. This is to support
162 # reference builds. 162 # reference builds.
163 # --disable-gesture-requirement-for-media-playback is the old one and 163 # --disable-gesture-requirement-for-media-playback is the old one and
164 # can be removed after M60 goes to stable. 164 # can be removed after M60 goes to stable.
165 '--enable-experimental-canvas-features', 165 '--enable-experimental-canvas-features',
166 # TODO(qinmin): After fixing crbug.com/592017, remove this command line. 166 # TODO(qinmin): After fixing crbug.com/592017, remove this command line.
167 '--reduce-security-for-testing' 167 '--reduce-security-for-testing'
168 ]) 168 ])
169 if 'content-shell' in options.browser_type: 169
170 def SetOptions(self, options):
171 super(_BlinkPerfMeasurement, self).SetOptions(options)
nednguyen 2017/05/10 09:54:47 The logic of adding "--expose-internals-for-testin
Xianzhu 2017/05/10 15:48:34 I see that the blink_gc test suite is using this c
172 if 'content-shell' in options.browser_options.browser_type:
170 options.AppendExtraBrowserArgs('--expose-internals-for-testing') 173 options.AppendExtraBrowserArgs('--expose-internals-for-testing')
171 174
172 def _ContinueTestRunWithTracing(self, tab): 175 def _ContinueTestRunWithTracing(self, tab):
173 tracing_categories = tab.EvaluateJavaScript( 176 tracing_categories = tab.EvaluateJavaScript(
174 'testRunner.tracingCategories') 177 'testRunner.tracingCategories')
175 config = tracing_config.TracingConfig() 178 config = tracing_config.TracingConfig()
176 config.enable_chrome_trace = True 179 config.enable_chrome_trace = True
177 config.chrome_trace_config.category_filter.AddFilterString( 180 config.chrome_trace_config.category_filter.AddFilterString(
178 'blink.console') # This is always required for js land trace event 181 'blink.console') # This is always required for js land trace event
179 config.chrome_trace_config.category_filter.AddFilterString( 182 config.chrome_trace_config.category_filter.AddFilterString(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 continue 278 continue
276 if event.name == 'FrameView::prePaint': 279 if event.name == 'FrameView::prePaint':
277 results.AddValue( 280 results.AddValue(
278 scalar.ScalarValue(page, 'prePaint', 'ms', event.duration)) 281 scalar.ScalarValue(page, 'prePaint', 'ms', event.duration))
279 if event.name == 'FrameView::paintTree': 282 if event.name == 'FrameView::paintTree':
280 results.AddValue( 283 results.AddValue(
281 scalar.ScalarValue(page, 'paint', 'ms', event.duration)) 284 scalar.ScalarValue(page, 'paint', 'ms', event.duration))
282 285
283 286
284 class _BlinkPerfBenchmark(perf_benchmark.PerfBenchmark): 287 class _BlinkPerfBenchmark(perf_benchmark.PerfBenchmark):
288
285 test = _BlinkPerfMeasurement 289 test = _BlinkPerfMeasurement
286 290
287 @classmethod 291 @classmethod
288 def Name(cls): 292 def Name(cls):
289 return 'blink_perf.' + cls.tag 293 return 'blink_perf.' + cls.tag
290 294
291 def CreateStorySet(self, options): 295 def CreateStorySet(self, options):
292 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) 296 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir)
293 return CreateStorySetFromPath(path, SKIPPED_FILE) 297 return CreateStorySetFromPath(path, SKIPPED_FILE)
294 298
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 402
399 403
400 @benchmark.Owner(emails=['hayato@chromium.org']) 404 @benchmark.Owner(emails=['hayato@chromium.org'])
401 class BlinkPerfShadowDOM(_BlinkPerfBenchmark): 405 class BlinkPerfShadowDOM(_BlinkPerfBenchmark):
402 tag = 'shadow_dom' 406 tag = 'shadow_dom'
403 subdir = 'ShadowDOM' 407 subdir = 'ShadowDOM'
404 408
405 @classmethod 409 @classmethod
406 def ShouldDisable(cls, possible_browser): # http://crbug.com/702319 410 def ShouldDisable(cls, possible_browser): # http://crbug.com/702319
407 return possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X' 411 return possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698