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/measurements/blink_perf.py

Issue 23512005: BrowserOptions.extra_browser_args is now a set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « tools/perf/benchmarks/spaceport.py ('k') | tools/perf/measurements/image_decoding.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 (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 """This measurement runs a blink performance test and reports the results.""" 5 """This measurement runs a blink performance test and reports the results."""
6 6
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from telemetry.core import util 10 from telemetry.core import util
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return CreatePageSetFromPath(page_set_arg) 74 return CreatePageSetFromPath(page_set_arg)
75 75
76 @property 76 @property
77 def results_are_the_same_on_every_page(self): 77 def results_are_the_same_on_every_page(self):
78 return False 78 return False
79 79
80 def WillNavigateToPage(self, page, tab): 80 def WillNavigateToPage(self, page, tab):
81 page.script_to_evaluate_on_commit = self._blink_perf_js 81 page.script_to_evaluate_on_commit = self._blink_perf_js
82 82
83 def CustomizeBrowserOptions(self, options): 83 def CustomizeBrowserOptions(self, options):
84 options.AppendExtraBrowserArg('--js-flags=--expose_gc') 84 options.AppendExtraBrowserArgs([
85 options.AppendExtraBrowserArg('--enable-experimental-web-platform-features') 85 '--js-flags=--expose_gc',
86 '--enable-experimental-web-platform-features'
87 ])
86 88
87 def MeasurePage(self, page, tab, results): 89 def MeasurePage(self, page, tab, results):
88 def _IsDone(): 90 def _IsDone():
89 return tab.EvaluateJavaScript('testRunner.isDone') 91 return tab.EvaluateJavaScript('testRunner.isDone')
90 util.WaitFor(_IsDone, 600) 92 util.WaitFor(_IsDone, 600)
91 93
92 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML') 94 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML')
93 95
94 for line in log.splitlines(): 96 for line in log.splitlines():
95 if not line.startswith('values '): 97 if not line.startswith('values '):
96 continue 98 continue
97 parts = line.split() 99 parts = line.split()
98 values = [float(v.replace(',', '')) for v in parts[1:-1]] 100 values = [float(v.replace(',', '')) for v in parts[1:-1]]
99 units = parts[-1] 101 units = parts[-1]
100 metric = page.display_name.split('.')[0].replace('/', '_') 102 metric = page.display_name.split('.')[0].replace('/', '_')
101 results.Add(metric, units, values) 103 results.Add(metric, units, values)
102 break 104 break
103 105
104 print log 106 print log
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/spaceport.py ('k') | tools/perf/measurements/image_decoding.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698