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

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

Issue 1644353002: Enable blink_perf.canvas on Android Perf bots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add --reduce-security-for-testing Created 4 years, 9 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 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 self._blink_perf_js = f.read() 81 self._blink_perf_js = f.read()
82 82
83 def WillNavigateToPage(self, page, tab): 83 def WillNavigateToPage(self, page, tab):
84 page.script_to_evaluate_on_commit = self._blink_perf_js 84 page.script_to_evaluate_on_commit = self._blink_perf_js
85 85
86 def CustomizeBrowserOptions(self, options): 86 def CustomizeBrowserOptions(self, options):
87 options.AppendExtraBrowserArgs([ 87 options.AppendExtraBrowserArgs([
88 '--js-flags=--expose_gc', 88 '--js-flags=--expose_gc',
89 '--enable-experimental-web-platform-features', 89 '--enable-experimental-web-platform-features',
90 '--disable-gesture-requirement-for-media-playback', 90 '--disable-gesture-requirement-for-media-playback',
91 '--enable-experimental-canvas-features' 91 '--enable-experimental-canvas-features',
92 # TODO(qinmin): After fixing crbug.com/592017, remove this command line.
93 '--reduce-security-for-testing'
dshwang 2016/03/04 16:30:51 add the command line
92 ]) 94 ])
93 if 'content-shell' in options.browser_type: 95 if 'content-shell' in options.browser_type:
94 options.AppendExtraBrowserArgs('--expose-internals-for-testing') 96 options.AppendExtraBrowserArgs('--expose-internals-for-testing')
95 97
96 def ValidateAndMeasurePage(self, page, tab, results): 98 def ValidateAndMeasurePage(self, page, tab, results):
97 tab.WaitForJavaScriptExpression('testRunner.isDone', 600) 99 tab.WaitForJavaScriptExpression('testRunner.isDone', 600)
98 100
99 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML') 101 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML')
100 102
101 for line in log.splitlines(): 103 for line in log.splitlines():
104 if line.startswith("FATAL: "):
105 print line
106 continue
102 if not line.startswith('values '): 107 if not line.startswith('values '):
103 continue 108 continue
104 parts = line.split() 109 parts = line.split()
105 values = [float(v.replace(',', '')) for v in parts[1:-1]] 110 values = [float(v.replace(',', '')) for v in parts[1:-1]]
106 units = parts[-1] 111 units = parts[-1]
107 metric = page.display_name.split('.')[0].replace('/', '_') 112 metric = page.display_name.split('.')[0].replace('/', '_')
108 results.AddValue(list_of_scalar_values.ListOfScalarValues( 113 results.AddValue(list_of_scalar_values.ListOfScalarValues(
109 results.current_page, metric, units, values)) 114 results.current_page, metric, units, values))
110 115
111 break 116 break
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 164
160 @classmethod 165 @classmethod
161 def Name(cls): 166 def Name(cls):
162 return 'blink_perf.css' 167 return 'blink_perf.css'
163 168
164 def CreateStorySet(self, options): 169 def CreateStorySet(self, options):
165 path = os.path.join(BLINK_PERF_BASE_DIR, 'CSS') 170 path = os.path.join(BLINK_PERF_BASE_DIR, 'CSS')
166 return CreateStorySetFromPath(path, SKIPPED_FILE) 171 return CreateStorySetFromPath(path, SKIPPED_FILE)
167 172
168 173
169 @benchmark.Disabled('android', # http://crbug.com/496707 174 @benchmark.Disabled('reference') # http://crbug.com/576779
170 'reference') # http://crbug.com/576779
171 class BlinkPerfCanvas(perf_benchmark.PerfBenchmark): 175 class BlinkPerfCanvas(perf_benchmark.PerfBenchmark):
172 tag = 'canvas' 176 tag = 'canvas'
173 test = _BlinkPerfMeasurement 177 test = _BlinkPerfMeasurement
174 178
175 @classmethod 179 @classmethod
176 def Name(cls): 180 def Name(cls):
177 return 'blink_perf.canvas' 181 return 'blink_perf.canvas'
178 182
179 def CreateStorySet(self, options): 183 def CreateStorySet(self, options):
180 path = os.path.join(BLINK_PERF_BASE_DIR, 'Canvas') 184 path = os.path.join(BLINK_PERF_BASE_DIR, 'Canvas')
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 328
325 def CreateStorySet(self, options): 329 def CreateStorySet(self, options):
326 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') 330 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket')
327 return CreateStorySetFromPath( 331 return CreateStorySetFromPath(
328 path, SKIPPED_FILE, 332 path, SKIPPED_FILE,
329 shared_page_state_class=_SharedPywebsocketPageState) 333 shared_page_state_class=_SharedPywebsocketPageState)
330 334
331 @classmethod 335 @classmethod
332 def ShouldDisable(cls, possible_browser): 336 def ShouldDisable(cls, possible_browser):
333 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 337 return cls.IsSvelte(possible_browser) # http://crbug.com/551950
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698