diff options
author | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 22:55:12 +0000 |
---|---|---|
committer | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 22:55:12 +0000 |
commit | 34b4e1f2b625dea7344983ab6d3dc65c3bcd8ee3 (patch) | |
tree | a128ade50130547f9f4fa540c7878b51def5a184 /tools/perf | |
parent | 8a867bb37a09a0bbfd70e5599942fd52c9d6ecd1 (diff) | |
download | chromium_src-34b4e1f2b625dea7344983ab6d3dc65c3bcd8ee3.zip chromium_src-34b4e1f2b625dea7344983ab6d3dc65c3bcd8ee3.tar.gz chromium_src-34b4e1f2b625dea7344983ab6d3dc65c3bcd8ee3.tar.bz2 |
[Telemetry] Utilize CreatePageSet for benchmarks with one page set.
BUG=None
TEST=Ran all modified benchmarks locally on linux
NOTRY=True
R=dtu@chromium.org, nduca@chromium.org
Review URL: https://codereview.chromium.org/15463003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/page_sets/dom_perf.json | 15 | ||||
-rw-r--r-- | tools/perf/page_sets/jsgamebench.json | 7 | ||||
-rw-r--r-- | tools/perf/page_sets/kraken.json | 7 | ||||
-rw-r--r-- | tools/perf/page_sets/octane.json | 6 | ||||
-rw-r--r-- | tools/perf/page_sets/robohornetpro.json | 7 | ||||
-rw-r--r-- | tools/perf/page_sets/spaceport.json | 6 | ||||
-rw-r--r-- | tools/perf/page_sets/sunspider.json | 7 | ||||
-rw-r--r-- | tools/perf/perf_tools/dom_perf.py | 19 | ||||
-rw-r--r-- | tools/perf/perf_tools/jsgamebench.py | 13 | ||||
-rw-r--r-- | tools/perf/perf_tools/kraken.py | 13 | ||||
-rw-r--r-- | tools/perf/perf_tools/octane.py | 12 | ||||
-rw-r--r-- | tools/perf/perf_tools/robohornetpro.py | 15 | ||||
-rw-r--r-- | tools/perf/perf_tools/spaceport.py | 12 | ||||
-rw-r--r-- | tools/perf/perf_tools/sunspider.py | 14 |
14 files changed, 97 insertions, 56 deletions
diff --git a/tools/perf/page_sets/dom_perf.json b/tools/perf/page_sets/dom_perf.json deleted file mode 100644 index ef35d28..0000000 --- a/tools/perf/page_sets/dom_perf.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "description": "Dom Perf benchmark", - "pages": [ - { "url": "file:///../../../data/dom_perf/run.html?run=Accessors&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=CloneNodes&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=CreateNodes&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=DOMDivWalk&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=DOMTable&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=DOMWalk&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=Events&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=Get+Elements&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=GridSort&reportInJS=1" }, - { "url": "file:///../../../data/dom_perf/run.html?run=Template&reportInJS=1" } - ] -} diff --git a/tools/perf/page_sets/jsgamebench.json b/tools/perf/page_sets/jsgamebench.json deleted file mode 100644 index 7c13bed..0000000 --- a/tools/perf/page_sets/jsgamebench.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "Facebook's JSGameBench benchmark", - "archive_data_file": "../data/jsgamebench.json", - "pages": [ - { "url": "http://localhost/" } - ] -} diff --git a/tools/perf/page_sets/kraken.json b/tools/perf/page_sets/kraken.json deleted file mode 100644 index 4692cdc..0000000 --- a/tools/perf/page_sets/kraken.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "Kraken JavaScript benchmark", - "archive_data_file": "../data/kraken.json", - "pages": [ - { "url": "http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html" } - ] -} diff --git a/tools/perf/page_sets/octane.json b/tools/perf/page_sets/octane.json deleted file mode 100644 index bb3b8bd..0000000 --- a/tools/perf/page_sets/octane.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Octane JavaScript benchmark", - "pages": [ - { "url": "file:///../../../chrome/test/data/perf/third_party/octane/index.html?auto=1" } - ] -} diff --git a/tools/perf/page_sets/robohornetpro.json b/tools/perf/page_sets/robohornetpro.json deleted file mode 100644 index de139f7..0000000 --- a/tools/perf/page_sets/robohornetpro.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "RoboHornet Pro benchmark", - "archive_data_file": "../data/robohornetpro.json", - "pages": [ - { "url": "http://ie.microsoft.com/testdrive/performance/robohornetpro/" } - ] -} diff --git a/tools/perf/page_sets/spaceport.json b/tools/perf/page_sets/spaceport.json deleted file mode 100644 index 97a6519..0000000 --- a/tools/perf/page_sets/spaceport.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Spaceport.io benchmark.", - "pages": [ - { "url": "file:///../../../chrome/test/data/third_party/spaceport/index.html" } - ] -} diff --git a/tools/perf/page_sets/sunspider.json b/tools/perf/page_sets/sunspider.json deleted file mode 100644 index 408d94a..0000000 --- a/tools/perf/page_sets/sunspider.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "SunSpider JavaScript benchmark", - "serving_dirs": ["../../../chrome/test/data/sunspider/"], - "pages": [ - { "url": "file:///../../../chrome/test/data/sunspider/sunspider-1.0/driver.html" } - ] -} diff --git a/tools/perf/perf_tools/dom_perf.py b/tools/perf/perf_tools/dom_perf.py index a9f9390..7d99108 100644 --- a/tools/perf/perf_tools/dom_perf.py +++ b/tools/perf/perf_tools/dom_perf.py @@ -4,9 +4,11 @@ import json import math +import os from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set def _GeometricMean(values): @@ -33,6 +35,23 @@ SCORE_TRACE_NAME = 'score' class DomPerf(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + BASE_PAGE = 'file:///../../../data/dom_perf/run.html?reportInJS=1&run=' + return page_set.PageSet.FromDict({ + 'pages': [ + { 'url': BASE_PAGE + 'Accessors' }, + { 'url': BASE_PAGE + 'CloneNodes' }, + { 'url': BASE_PAGE + 'CreateNodes' }, + { 'url': BASE_PAGE + 'DOMDivWalk' }, + { 'url': BASE_PAGE + 'DOMTable' }, + { 'url': BASE_PAGE + 'DOMWalk' }, + { 'url': BASE_PAGE + 'Events' }, + { 'url': BASE_PAGE + 'Get+Elements' }, + { 'url': BASE_PAGE + 'GridSort' }, + { 'url': BASE_PAGE + 'Template' } + ] + }, os.path.abspath(__file__)) + @property def results_are_the_same_on_every_page(self): return False diff --git a/tools/perf/perf_tools/jsgamebench.py b/tools/perf/perf_tools/jsgamebench.py index 474d43a..d769141 100644 --- a/tools/perf/perf_tools/jsgamebench.py +++ b/tools/perf/perf_tools/jsgamebench.py @@ -2,10 +2,23 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +"""Runs Facebook's JSGameBench benchmark.""" + +import os + from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set class JsGameBench(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'archive_data_file': '../data/jsgamebench.json', + 'pages': [ + { 'url': 'http://localhost/' } + ] + }, os.path.abspath(__file__)) + def MeasurePage(self, _, tab, results): tab.ExecuteJavaScript('UI.call({}, "perftest")') diff --git a/tools/perf/perf_tools/kraken.py b/tools/perf/perf_tools/kraken.py index 2d2086d..e19da48 100644 --- a/tools/perf/perf_tools/kraken.py +++ b/tools/perf/perf_tools/kraken.py @@ -2,13 +2,26 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +"""Runs Mozilla's Kraken JavaScript benchmark.""" + +import os + from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set def _Mean(l): return float(sum(l)) / len(l) if len(l) > 0 else 0.0 class Kraken(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'archive_data_file': '../data/kraken.json', + 'pages': [ + { 'url': 'http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html' } + ] + }, os.path.abspath(__file__)) + def MeasurePage(self, _, tab, results): js_is_done = """ document.title.indexOf("Results") != -1 && document.readyState == "complete" diff --git a/tools/perf/perf_tools/octane.py b/tools/perf/perf_tools/octane.py index 16be773..7fa5e22 100644 --- a/tools/perf/perf_tools/octane.py +++ b/tools/perf/perf_tools/octane.py @@ -1,10 +1,22 @@ # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + +import os + from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set class Octane(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'pages': [ + { 'url': 'file:///../../../chrome/test/data/perf/third_party/octane/' + 'index.html?auto=1' } + ] + }, os.path.abspath(__file__)) + def MeasurePage(self, _, tab, results): js_is_done = """ completed && !document.getElementById("progress-bar-container")""" diff --git a/tools/perf/perf_tools/robohornetpro.py b/tools/perf/perf_tools/robohornetpro.py index 9bd2553..b3065d5b 100644 --- a/tools/perf/perf_tools/robohornetpro.py +++ b/tools/perf/perf_tools/robohornetpro.py @@ -1,10 +1,25 @@ # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + +"""Runs Microsoft's RoboHornet Pro benchmark.""" + +import os + from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set class RobohornetPro(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'archive_data_file': '../data/robohornetpro.json', + 'pages': [ + { 'url': + 'http://ie.microsoft.com/testdrive/performance/robohornetpro/' } + ] + }, os.path.abspath(__file__)) + def CustomizeBrowserOptions(self, options): # Measurement require use of real Date.now() for measurement. options.wpr_make_javascript_deterministic = False diff --git a/tools/perf/perf_tools/spaceport.py b/tools/perf/perf_tools/spaceport.py index 8dec484..e3d7253 100644 --- a/tools/perf/perf_tools/spaceport.py +++ b/tools/perf/perf_tools/spaceport.py @@ -2,12 +2,24 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +"""Runs spaceport.io's PerfMarks benchmark.""" + import logging +import os from telemetry.core import util from telemetry.page import page_measurement +from telemetry.page import page_set class SpaceportMeasurement(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'pages': [ + {'url': + 'file:///../../../chrome/test/data/third_party/spaceport/index.html'} + ] + }, os.path.abspath(__file__)) + def CustomizeBrowserOptions(self, options): options.extra_browser_args.extend(['--disable-gpu-vsync']) diff --git a/tools/perf/perf_tools/sunspider.py b/tools/perf/perf_tools/sunspider.py index 78f5fce..91819b2 100644 --- a/tools/perf/perf_tools/sunspider.py +++ b/tools/perf/perf_tools/sunspider.py @@ -2,14 +2,26 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +"""Runs Apple's SunSpider JavaScript benchmark.""" + import collections import json +import os from telemetry.core import util from telemetry.page import page_measurement - +from telemetry.page import page_set class SunSpiderMeasurement(page_measurement.PageMeasurement): + def CreatePageSet(self, options): + return page_set.PageSet.FromDict({ + 'serving_dirs': ['../../../chrome/test/data/sunspider/'], + 'pages': [ + { 'url': 'file:///../../../chrome/test/data/sunspider/' + 'sunspider-1.0/driver.html' } + ] + }, os.path.abspath(__file__)) + def MeasurePage(self, _, tab, results): js_is_done = """ window.location.pathname.indexOf('results.html') >= 0""" |