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

Side by Side Diff: tools/perf/benchmarks/spaceport.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/pica.py ('k') | tools/perf/measurements/blink_perf.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) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Runs spaceport.io's PerfMarks benchmark.""" 5 """Runs spaceport.io's PerfMarks benchmark."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 9
10 from telemetry import test 10 from telemetry import test
11 from telemetry.core import util 11 from telemetry.core import util
12 from telemetry.page import page_measurement 12 from telemetry.page import page_measurement
13 from telemetry.page import page_set 13 from telemetry.page import page_set
14 14
15 15
16 class SpaceportMeasurement(page_measurement.PageMeasurement): 16 class SpaceportMeasurement(page_measurement.PageMeasurement):
17 def CustomizeBrowserOptions(self, options): 17 def CustomizeBrowserOptions(self, options):
18 options.extra_browser_args.extend(['--disable-gpu-vsync']) 18 options.AppendExtraBrowserArgs('--disable-gpu-vsync')
19 19
20 def MeasurePage(self, _, tab, results): 20 def MeasurePage(self, _, tab, results):
21 util.WaitFor(lambda: tab.EvaluateJavaScript( 21 util.WaitFor(lambda: tab.EvaluateJavaScript(
22 '!document.getElementById("start-performance-tests").disabled'), 60) 22 '!document.getElementById("start-performance-tests").disabled'), 60)
23 23
24 tab.ExecuteJavaScript(""" 24 tab.ExecuteJavaScript("""
25 window.__results = {}; 25 window.__results = {};
26 window.console.log = function(str) { 26 window.console.log = function(str) {
27 if (!str) return; 27 if (!str) return;
28 var key_val = str.split(': '); 28 var key_val = str.split(': ');
(...skipping 28 matching lines...) Expand all
57 class Spaceport(test.Test): 57 class Spaceport(test.Test):
58 """spaceport.io's PerfMarks benchmark.""" 58 """spaceport.io's PerfMarks benchmark."""
59 test = SpaceportMeasurement 59 test = SpaceportMeasurement
60 60
61 def CreatePageSet(self, options): 61 def CreatePageSet(self, options):
62 spaceport_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test', 62 spaceport_dir = os.path.join(util.GetChromiumSrcDir(), 'chrome', 'test',
63 'data', 'third_party', 'spaceport') 63 'data', 'third_party', 'spaceport')
64 return page_set.PageSet.FromDict( 64 return page_set.PageSet.FromDict(
65 {'pages': [{'url': 'file:///index.html'}]}, 65 {'pages': [{'url': 'file:///index.html'}]},
66 spaceport_dir) 66 spaceport_dir)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/pica.py ('k') | tools/perf/measurements/blink_perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698