Title: [206800] trunk/Tools
- Revision
- 206800
- Author
- rn...@webkit.org
- Date
- 2016-10-04 17:42:37 -0700 (Tue, 04 Oct 2016)
Log Message
Add the support for running ES6SampleBench to run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=162890
Reviewed by Saam Barati.
Added the support for running ES6SampleBench as "es6bench".
e.g. ./Tools/Scripts/run-benchmark --platform osx --plan es6bench --browser safari
Instead of the default 10 iterations, run the test 4 iterations using 5 instances of browser
for the total of 20 iterations.
* Scripts/webkitpy/benchmark_runner/data/patches/ES6SampleBench.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/es6bench.plan: Added.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(start): Fixed the bug that the linter will complain about the presence of "debugOutput" by
removing it if it's present.
Modified Paths
Added Paths
Diff
Modified: trunk/Tools/ChangeLog (206799 => 206800)
--- trunk/Tools/ChangeLog 2016-10-05 00:40:25 UTC (rev 206799)
+++ trunk/Tools/ChangeLog 2016-10-05 00:42:37 UTC (rev 206800)
@@ -1,3 +1,22 @@
+2016-10-04 Ryosuke Niwa <rn...@webkit.org>
+
+ Add the support for running ES6SampleBench to run-benchmark
+ https://bugs.webkit.org/show_bug.cgi?id=162890
+
+ Reviewed by Saam Barati.
+
+ Added the support for running ES6SampleBench as "es6bench".
+ e.g. ./Tools/Scripts/run-benchmark --platform osx --plan es6bench --browser safari
+
+ Instead of the default 10 iterations, run the test 4 iterations using 5 instances of browser
+ for the total of 20 iterations.
+
+ * Scripts/webkitpy/benchmark_runner/data/patches/ES6SampleBench.patch: Added.
+ * Scripts/webkitpy/benchmark_runner/data/plans/es6bench.plan: Added.
+ * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
+ (start): Fixed the bug that the linter will complain about the presence of "debugOutput" by
+ removing it if it's present.
+
2016-10-04 Simon Fraser <simon.fra...@apple.com>
[iOS WK2] Make it possible for a test to describe a user gesture as a stream of events in JSON format
Added: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ES6SampleBench.patch (0 => 206800)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ES6SampleBench.patch (rev 0)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ES6SampleBench.patch 2016-10-05 00:42:37 UTC (rev 206800)
@@ -0,0 +1,48 @@
+diff --git a/driver.js b/driver.js
+index 609a562..afa4976 100644
+--- a/driver.js
++++ b/driver.js
+@@ -118,6 +118,31 @@ class Driver {
+ this._benchmark = this._iterator ? this._iterator.next().value : null;
+ if (!this._benchmark) {
+ if (!this._numIterations) {
++
++ let tests = {};
++ for (let [benchmark, results] of this._benchmarks) {
++ let subtests = {};
++ for (let subResultName of Results.subResults)
++ subtests[subResultName] = {"metrics": {"Time": {"current": results[subResultName]._data}}};
++ tests[benchmark.name] = {"metrics": {"Time" : ["Geometric"]}, "tests": subtests};
++ }
++
++ let xhr = new XMLHttpRequest();
++ xhr.open("POST", "/report");
++ let content = JSON.stringify({"ES6SampleBench": {"metrics" : {"Time" : ["Geometric"]}, "tests" : tests}});
++ xhr.setRequestHeader("Content-type", "application/json");
++ xhr.setRequestHeader("Content-length", content.length);
++ xhr.setRequestHeader("Connection", "close");
++
++ xhr._onreadystatechange_ = function() {
++ if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
++ closeRequest = new XMLHttpRequest();
++ closeRequest.open("GET", "/shutdown");
++ closeRequest.send();
++ }
++ }
++ xhr.send(content);
++
+ if (isInBrowser) {
+ this._triggerCell.innerHTML =
+ (this._hadErrors ? "Failures encountered!" : "Success!") +
+diff --git a/index.html b/index.html
+index 5860e02..1a27c0c 100644
+--- a/index.html
++++ b/index.html
+@@ -8,6 +8,7 @@ window._onerror_ = function(message, url, lineNumber)
+ {
+ document.getElementById("trigger").innerHTML = "ERROR: " + url + ":" + lineNumber + ": " + message;
+ }
++window._onload_ = function () { driver.start(4); }
+
+ const isInBrowser = true;
+ </script>
Added: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/es6bench.plan (0 => 206800)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/es6bench.plan (rev 0)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/es6bench.plan 2016-10-05 00:42:37 UTC (rev 206800)
@@ -0,0 +1,8 @@
+{
+ "timeout": 600,
+ "count": 5,
+ "svn_source": "https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/ES6SampleBench/@r206760",
+ "benchmark_patch": "data/patches/ES6SampleBench.patch",
+ "entry_point": "index.html",
+ "output_file": "es6bench.result"
+}
Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py (206799 => 206800)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py 2016-10-05 00:40:25 UTC (rev 206799)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py 2016-10-05 00:42:37 UTC (rev 206800)
@@ -44,7 +44,10 @@
def start(args):
if args.json_file:
- BenchmarkRunner.show_results(json.load(open(args.json_file, 'r')), args.scale_unit)
+ results_json = json.load(open(args.json_file, 'r'))
+ if 'debugOutput' in results_json:
+ del results_json['debugOutput']
+ BenchmarkRunner.show_results(results_json, args.scale_unit)
return
if args.allplans:
failed = []
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes