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

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

Issue 307263002: [Telemetry] Retire JSGameBench. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 6 years, 6 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
« no previous file with comments | « no previous file | 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
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
7 As of May 14, 2014, JSGameBench is no longer maintained. See README.md:
8 https://github.com/facebookarchive/jsgamebench
9
10 The benchmark is kept here for historical purposes but is disabled on the bots.
11 """
6 12
7 import os 13 import os
8 14
9 from telemetry import test 15 from telemetry import test
10 from telemetry.page import page_measurement 16 from telemetry.page import page_measurement
11 from telemetry.page import page_set 17 from telemetry.page import page_set
12 18
13 19
14 class _JsgamebenchMeasurement(page_measurement.PageMeasurement): 20 class _JsgamebenchMeasurement(page_measurement.PageMeasurement):
15 def __init__(self): 21 def __init__(self):
16 super(_JsgamebenchMeasurement, self).__init__() 22 super(_JsgamebenchMeasurement, self).__init__()
17 23
18 def MeasurePage(self, page, tab, results): 24 def MeasurePage(self, page, tab, results):
19 tab.ExecuteJavaScript('UI.call({}, "perftest")') 25 tab.ExecuteJavaScript('UI.call({}, "perftest")')
20 tab.WaitForJavaScriptExpression( 26 tab.WaitForJavaScriptExpression(
21 'document.getElementById("perfscore0") != null', 1800) 27 'document.getElementById("perfscore0") != null', 1800)
22 28
23 js_get_results = 'document.getElementById("perfscore0").innerHTML' 29 js_get_results = 'document.getElementById("perfscore0").innerHTML'
24 result = int(tab.EvaluateJavaScript(js_get_results)) 30 result = int(tab.EvaluateJavaScript(js_get_results))
25 results.Add('Score', 'score (bigger is better)', result) 31 results.Add('Score', 'score (bigger is better)', result)
26 32
27 33
28 @test.Disabled('linux') # crbug.com/365237 34 @test.Disabled
29 class Jsgamebench(test.Test): 35 class Jsgamebench(test.Test):
30 """Counts how many animating sprites can move around on the screen at once.""" 36 """Counts how many animating sprites can move around on the screen at once."""
31 test = _JsgamebenchMeasurement 37 test = _JsgamebenchMeasurement
32 38
33 def CreatePageSet(self, options): 39 def CreatePageSet(self, options):
34 ps = page_set.PageSet( 40 ps = page_set.PageSet(
35 archive_data_file='../page_sets/data/jsgamebench.json', 41 archive_data_file='../page_sets/data/jsgamebench.json',
36 file_path=os.path.dirname(__file__)) 42 file_path=os.path.dirname(__file__))
37 ps.AddPageWithDefaultRunNavigate('http://localhost/') 43 ps.AddPageWithDefaultRunNavigate('http://localhost/')
38 return ps 44 return ps
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698