Title: [227925] trunk/Tools
- Revision
- 227925
- Author
- [email protected]
- Date
- 2018-01-31 12:58:20 -0800 (Wed, 31 Jan 2018)
Log Message
Add the support for running StyleBench to run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=182323
Reviewed by Antti Koivisto.
Added the plan file and the patch needed to run StyleBench using run-benchmark as of r227863.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Tools/ChangeLog (227924 => 227925)
--- trunk/Tools/ChangeLog 2018-01-31 20:40:59 UTC (rev 227924)
+++ trunk/Tools/ChangeLog 2018-01-31 20:58:20 UTC (rev 227925)
@@ -1,3 +1,15 @@
+2018-01-31 Ryosuke Niwa <[email protected]>
+
+ Add the support for running StyleBench to run-benchmark
+ https://bugs.webkit.org/show_bug.cgi?id=182323
+
+ Reviewed by Antti Koivisto.
+
+ Added the plan file and the patch needed to run StyleBench using run-benchmark as of r227863.
+
+ * Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch: Added.
+ * Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan: Added.
+
2018-01-31 Wenson Hsieh <[email protected]>
[iOS WK2] API test DataInteractionTests.ExternalSourceDataTransferItemGetFolderAsEntry is failing after an SDK update
Added: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch (0 => 227925)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch (rev 0)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch 2018-01-31 20:58:20 UTC (rev 227925)
@@ -0,0 +1,80 @@
+diff --git a/index.html b/index.html
+index 1269f30e646..2edd6770af6 100644
+--- a/index.html
++++ b/index.html
+@@ -7,7 +7,6 @@
+ <script src="" defer></script>
+ <script src="" defer></script>
+ <script src="" defer></script>
+- <script src="" defer></script>
+ <script src="" defer></script>
+ <script src="" defer></script>
+ </head>
+diff --git a/resources/benchmark-report.js b/resources/benchmark-report.js
+index c4b4c64f83d..962c0560265 100644
+--- a/resources/benchmark-report.js
++++ b/resources/benchmark-report.js
+@@ -1,5 +1,63 @@
+ // This file can be customized to report results as needed.
+
++(function () {
++ window._onload_ = function () {
++ startBenchmark();
++ showSection('running');
++ }
++
++ originalDidFinishLastIteration = window.benchmarkClient.didFinishLastIteration;
++
++ window.benchmarkClient.didFinishLastIteration = function () {
++ originalDidFinishLastIteration.apply(this);
++
++ const scores = [];
++ const resultsSuites = {};
++ const results = {'StyleBench': {
++ 'metrics': {
++ 'Score': {'current': [scores]},
++ 'Time': ['Total', 'Geometric']},
++ 'tests': resultsSuites}};
++
++ for (const measuredValues of this._measuredValuesList) {
++ scores.push(measuredValues.score);
++ for (const suiteName in measuredValues.tests) {
++ const measuredTests = measuredValues.tests[suiteName].tests;
++ if (!(suiteName in resultsSuites))
++ resultsSuites[suiteName] = {'metrics': {'Time': ['Total']}, 'tests': {}};
++ const resultsTests = resultsSuites[suiteName].tests;
++ for (const testName in measuredTests) {
++ const measuredSubtests = measuredTests[testName].tests;
++ if (!(testName in resultsTests))
++ resultsTests[testName] = {'metrics': {'Time': ['Total']}, 'tests': {}};
++ const resultsSubtests = resultsTests[testName].tests;
++ for (const subtestName in measuredSubtests) {
++ if (!(subtestName in resultsSubtests))
++ resultsSubtests[subtestName] = {'metrics': {'Time': {'current': [[]]}}};
++ resultsSubtests[subtestName].metrics.Time.current[0].push(measuredSubtests[subtestName]);
++ }
++ }
++ }
++ }
++
++ const xhr = new XMLHttpRequest();
++ xhr.open("POST", "/report");
++
++ xhr.setRequestHeader("Content-type", "application/json");
++ xhr.setRequestHeader("Content-length", results.length);
++ xhr.setRequestHeader("Connection", "close");
++
++ xhr._onreadystatechange_ = function() {
++ if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
++ const closeRequest = new XMLHttpRequest();
++ closeRequest.open("GET", "/shutdown");
++ closeRequest.send();
++ }
++ }
++ setTimeout(() => xhr.send(JSON.stringify(results)), 5000);
++ }
++})();
++
+ (function () {
+ if (!window.testRunner && location.search != '?webkit' && location.hash != '#webkit')
+ return;
Added: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan (0 => 227925)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan (rev 0)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan 2018-01-31 20:58:20 UTC (rev 227925)
@@ -0,0 +1,8 @@
+{
+ "timeout": 600,
+ "count": 4,
+ "svn_source": "https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/StyleBench/@r227863",
+ "webserver_benchmark_patch": "data/patches/webserver/StyleBench.patch",
+ "entry_point": "index.html",
+ "output_file": "stylebench.result"
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes