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

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

Issue 99483007: [telemetry] Ensure page sets reference the right WPR archives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « no previous file | tools/perf/benchmarks/kraken.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 Facebook's JSGameBench benchmark.""" 5 """Runs Facebook's JSGameBench benchmark."""
6 6
7 import os 7 import os
8 8
9 from telemetry import test 9 from telemetry import test
10 from telemetry.page import page_measurement 10 from telemetry.page import page_measurement
11 from telemetry.page import page_set 11 from telemetry.page import page_set
12 12
13 13
14 class _JsgamebenchMeasurement(page_measurement.PageMeasurement): 14 class _JsgamebenchMeasurement(page_measurement.PageMeasurement):
15 def MeasurePage(self, _, tab, results): 15 def MeasurePage(self, _, tab, results):
16 tab.ExecuteJavaScript('UI.call({}, "perftest")') 16 tab.ExecuteJavaScript('UI.call({}, "perftest")')
17 tab.WaitForJavaScriptExpression( 17 tab.WaitForJavaScriptExpression(
18 'document.getElementById("perfscore0") != null', 1800) 18 'document.getElementById("perfscore0") != null', 1800)
19 js_get_results = 'document.getElementById("perfscore0").innerHTML' 19 js_get_results = 'document.getElementById("perfscore0").innerHTML'
20 result = int(tab.EvaluateJavaScript(js_get_results)) 20 result = int(tab.EvaluateJavaScript(js_get_results))
21 results.Add('Score', 'score (bigger is better)', result) 21 results.Add('Score', 'score (bigger is better)', result)
22 22
23 23
24 class Jsgamebench(test.Test): 24 class Jsgamebench(test.Test):
25 """Counts how many animating sprites can move around on the screen at once.""" 25 """Counts how many animating sprites can move around on the screen at once."""
26 test = _JsgamebenchMeasurement 26 test = _JsgamebenchMeasurement
27 27
28 def CreatePageSet(self, options): 28 def CreatePageSet(self, options):
29 return page_set.PageSet.FromDict({ 29 return page_set.PageSet.FromDict({
30 'archive_data_file': '../data/jsgamebench.json', 30 'archive_data_file': '../page_sets/data/jsgamebench.json',
31 'pages': [ 31 'pages': [
32 { 'url': 'http://localhost/' } 32 { 'url': 'http://localhost/' }
33 ] 33 ]
34 }, os.path.dirname(__file__)) 34 }, os.path.dirname(__file__))
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/kraken.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698