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

Side by Side Diff: tools/perf/perf_tools/spaceport.py

Issue 11314012: Add spaceport benchmark to Chrome Remote Control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug Created 8 years, 1 month 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/page_sets/spaceport.json ('k') | 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
(Empty)
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
3 # found in the LICENSE file.
4
5 from chrome_remote_control import multi_page_benchmark
6 from chrome_remote_control import util
7
8 class SpaceportBenchmark(multi_page_benchmark.MultiPageBenchmark):
9 def CustomizeBrowserOptions(self, options):
10 options.extra_browser_args.extend(['--disable-gpu-vsync'])
11
12 def MeasurePage(self, _, tab, results):
13 tab.runtime.Execute("""
14 window.__results = {};
15 window.console.log = function(str) {
16 if (!str) return;
17 var key_val = str.split(': ');
18 if (!key_val.length == 2) return;
19 __results[key_val[0]] = key_val[1];
20 };
21 document.getElementById('start-performance-tests').click();
22 """)
23
24 js_get_results = 'JSON.stringify(window.__results)'
25 def _IsDone():
26 num_tests_in_benchmark = 30
27 result_dict = eval(tab.runtime.Evaluate(js_get_results))
28 return num_tests_in_benchmark == len(result_dict)
29 util.WaitFor(_IsDone, 1200)
30
31 result_dict = eval(tab.runtime.Evaluate(js_get_results))
32 for key in result_dict:
33 chart, trace = key.split('.', 1)
34 results.Add(trace, 'objects (bigger is better)', float(result_dict[key]),
35 chart_name=chart, data_type='unimportant')
36 results.Add('Overall', 'objects (bigger is better)',
37 [float(x) for x in result_dict.values()])
OLDNEW
« no previous file with comments | « tools/perf/page_sets/spaceport.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698