summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 17:24:58 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 17:24:58 +0000
commit361c7912344481db45a790ef764282f9a0b78664 (patch)
tree4472e7be951c96bc4059498ac4674b78aee9adb7 /tools/perf
parent7785a05bc40cce0d7424be7372de56b80e9b5f56 (diff)
downloadchromium_src-361c7912344481db45a790ef764282f9a0b78664.zip
chromium_src-361c7912344481db45a790ef764282f9a0b78664.tar.gz
chromium_src-361c7912344481db45a790ef764282f9a0b78664.tar.bz2
Automate Robohornet Pro with Chrome Remote Control.
BUG=152269 TEST=Manual on linux Review URL: https://codereview.chromium.org/11336038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/page_sets/robohornetpro.json9
-rwxr-xr-xtools/perf/perf_tools/multipage_benchmark_runner.py3
-rw-r--r--tools/perf/perf_tools/robohornetpro.py22
3 files changed, 34 insertions, 0 deletions
diff --git a/tools/perf/page_sets/robohornetpro.json b/tools/perf/page_sets/robohornetpro.json
new file mode 100644
index 0000000..a1c9079
--- /dev/null
+++ b/tools/perf/page_sets/robohornetpro.json
@@ -0,0 +1,9 @@
+{
+ "description": "RoboHornet Pro benchmark",
+ "archive_path": "../data/robohornetpro.wpr",
+ "pages": [
+ {
+ "url": "http://ie.microsoft.com/testdrive/performance/robohornetpro/"
+ }
+ ]
+}
diff --git a/tools/perf/perf_tools/multipage_benchmark_runner.py b/tools/perf/perf_tools/multipage_benchmark_runner.py
index d90b2d5..e390bb4 100755
--- a/tools/perf/perf_tools/multipage_benchmark_runner.py
+++ b/tools/perf/perf_tools/multipage_benchmark_runner.py
@@ -15,6 +15,7 @@ from chrome_remote_control import page_set
import perf_tools.first_paint_time_benchmark
import perf_tools.kraken
+import perf_tools.robohornetpro
import perf_tools.scrolling_benchmark
import perf_tools.skpicture_printer
import perf_tools.texture_upload_benchmark
@@ -25,6 +26,8 @@ _BENCHMARKS = {
perf_tools.first_paint_time_benchmark.FirstPaintTimeBenchmark,
'kraken':
perf_tools.kraken.Kraken,
+ 'robohornetpro':
+ perf_tools.robohornetpro.RobohornetPro,
'scrolling_benchmark':
perf_tools.scrolling_benchmark.ScrollingBenchmark,
'skpicture_printer':
diff --git a/tools/perf/perf_tools/robohornetpro.py b/tools/perf/perf_tools/robohornetpro.py
new file mode 100644
index 0000000..ab06ace
--- /dev/null
+++ b/tools/perf/perf_tools/robohornetpro.py
@@ -0,0 +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.
+
+from chrome_remote_control import multi_page_benchmark
+from chrome_remote_control import util
+
+class RobohornetPro(multi_page_benchmark.MultiPageBenchmark):
+ def CustomizeBrowserOptions(self, options):
+ # Benchmark require use of real Date.now() for measurement.
+ options.wpr_make_javascript_deterministic = False
+
+ def MeasurePage(self, _, tab, results):
+ tab.runtime.Execute('ToggleRoboHornet()')
+
+ done = 'document.getElementById("results").innerHTML.indexOf("Total") != -1'
+ def _IsDone():
+ return tab.runtime.Evaluate(done)
+ util.WaitFor(_IsDone, 60)
+
+ result = int(tab.runtime.Evaluate('stopTime - startTime'))
+ results.Add('Total', 'ms', result)