Temporarily add back the file removed in r210463 to unbreak internal bots.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2017 23:45:22 +0000 (23:45 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2017 23:45:22 +0000 (23:45 +0000)
* Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Copied from Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch [new file with mode: 0644]

index 6fcce03..c3e102e 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-10  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Temporarily add back the file removed in r210463 to unbreak internal bots.
+
+        * Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Copied from Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch.
+
 2017-01-10  Jonathan Bedard  <jbedard@apple.com>
 
         svn-apply failed to apply a patch (deleting file with svn property)
diff --git a/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch b/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch
new file mode 100644 (file)
index 0000000..8e2126e
--- /dev/null
@@ -0,0 +1,75 @@
+diff --git a/resources/runner/animometer.js b/resources/runner/animometer.js
+index b20a1c9..e434e89 100644
+--- a/resources/runner/animometer.js
++++ b/resources/runner/animometer.js
+@@ -320,6 +320,61 @@ window.benchmarkRunnerClient = {
+     didFinishLastIteration: function()
+     {
+         benchmarkController.showResults();
++    },
++
++    _computeTestReport: function(testName, testResults)
++    {
++        return [testResults[Strings.json.score]];
++    },
++
++    _computeSuiteReports: function(suiteName, suiteResults)
++    {
++        var testsReports = {};
++        for (var testName in suiteResults) {
++            var testReports = this._computeTestReport(testName, suiteResults[testName]);
++            testsReports[testName] = { "metrics": { "Score": { "current": testReports } } };
++        }
++        return testsReports;
++    },
++
++    _computeIterationReports: function(iterationResults)
++    {
++        var suitesReports = {};
++        for (var suiteName in iterationResults[Strings.json.results.tests]) {
++            var testsReports = this._computeSuiteReports(suiteName, iterationResults[Strings.json.results.tests][suiteName]);
++            suitesReports[suiteName] = { "metrics": { "Score": ["Geometric"] }, "tests": testsReports };
++        }
++        return suitesReports;
++    },
++
++    _computeResultsReports: function()
++    {
++        var results = this.results.results[0];
++        var iterationReports = this._computeIterationReports(results);
++        var debugOutput = {
++            options: benchmarkRunnerClient.results.options,
++            data: benchmarkRunnerClient.results.data,
++        }
++        return {"Animometer": {"metrics" : {"Score" : ["Geometric"]}, "tests" : iterationReports }, "debugOutput": debugOutput};
++    },
++
++    didFinishLastIteration: function()
++    {
++        // submit result to server
++        var results = JSON.stringify(this._computeResultsReports());
++        var 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) {
++                closeRequest = new XMLHttpRequest();
++                closeRequest.open("GET", "/shutdown");
++                closeRequest.send()
++            }
++        }
++        xhr.send(results);
+     }
+ };
+
+@@ -357,7 +408,7 @@ window.sectionsManager =
+ window.benchmarkController = {
+     initialize: function()
+     {
+-        benchmarkController.addOrientationListenerIfNecessary();
++        setTimeout(benchmarkController.startBenchmark.bind(benchmarkController), 3000);
+     },
+
+     addOrientationListenerIfNecessary: function() {