Make run-perf-tests work with Speedometer 2.0 and re-enable the test
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2018 06:14:52 +0000 (06:14 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 10 Feb 2018 06:14:52 +0000 (06:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182088

Reviewed by Antti Koivisto.

This patch updates the test harness to report new metrics of Speedometer 2.0.

Replaced the total time by the geometric mean of the time spent in each suite, and added scores
as a metric in addition to time. Also, updated the PerfTestRunner harness and the results template
to support "Score" metric with "pt" as its unit.

* Skipped: Unskipped the test.
* Speedometer/resources/benchmark-report.js:
(window.benchmarkClient.willStartFirstIteration..createTest): Added the unit as an optional argument
to report the score in addition to time. Also report the geomean of time instead of the total time.
(window.benchmarkClient.willStartFirstIteration): Report the geomean of time.
(window.benchmarkClient.didRunSuites): Record the entire measuredValues instead of just tests.
(window.benchmarkClient.didFinishLastIteration): Report the scores.

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

PerformanceTests/ChangeLog
PerformanceTests/Skipped
PerformanceTests/Speedometer/resources/benchmark-report.js

index 6914d72..9702284 100644 (file)
@@ -1,3 +1,24 @@
+2018-02-09  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Make run-perf-tests work with Speedometer 2.0 and re-enable the test
+        https://bugs.webkit.org/show_bug.cgi?id=182088
+
+        Reviewed by Antti Koivisto.
+
+        This patch updates the test harness to report new metrics of Speedometer 2.0.
+
+        Replaced the total time by the geometric mean of the time spent in each suite, and added scores
+        as a metric in addition to time. Also, updated the PerfTestRunner harness and the results template
+        to support "Score" metric with "pt" as its unit.
+
+        * Skipped: Unskipped the test.
+        * Speedometer/resources/benchmark-report.js:
+        (window.benchmarkClient.willStartFirstIteration..createTest): Added the unit as an optional argument
+        to report the score in addition to time. Also report the geomean of time instead of the total time.
+        (window.benchmarkClient.willStartFirstIteration): Report the geomean of time.
+        (window.benchmarkClient.didRunSuites): Record the entire measuredValues instead of just tests.
+        (window.benchmarkClient.didFinishLastIteration): Report the scores.
+
 2018-02-09  Ross Kirsling  <ross.kirsling@sony.com>
 
         Use REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR on any non-Windows port.
index 0ad3e2f..b3a80a8 100644 (file)
@@ -82,7 +82,6 @@ Parser/html-parser-threaded.html
 Layout/LineLayoutJapanese.html
 
 # Don't run the interactive runner. We run index.html
-Speedometer/index.html
 Speedometer/InteractiveRunner.html
 StyleBench/InteractiveRunner.html
 
index c4b4c64..b33021d 100644 (file)
     window.benchmarkClient = {
         iterationCount: 5, // Use 4 different instances of DRT/WTR to run 5 iterations.
         willStartFirstIteration: function (iterationCount) {
-            createTest = function (name, aggregator, isLastTest) {
+            createTest = function (name, aggregator, isLastTest, unit = 'ms') {
                 return {
                     customIterationCount: iterationCount,
                     doNotIgnoreInitialRun: true,
                     doNotMeasureMemoryUsage: true,
                     continueTesting: !isLastTest,
-                    unit: 'ms',
+                    unit: unit,
                     name: name,
                     aggregator: aggregator};
             }
-            PerfTestRunner.prepareToMeasureValuesAsync(createTest(null, 'Total'));
+            PerfTestRunner.prepareToMeasureValuesAsync(createTest(null, 'Geometric'));
         },
         didRunSuites: function (measuredValues) {
-            PerfTestRunner.measureValueAsync(measuredValues.total);
-            valuesByIteration.push(measuredValues.tests);
+            PerfTestRunner.measureValueAsync(measuredValues.geomean);
+            valuesByIteration.push(measuredValues);
         },
         didFinishLastIteration: function () {
             document.head.removeChild(document.querySelector('style'));
                 values.aggregator = aggregator;
             }
 
+            var scores = [];
             valuesByIteration.forEach(function (measuredValues) {
-                for (var suiteName in measuredValues) {
-                    var suite = measuredValues[suiteName];
+                scores.push(measuredValues.score);
+                for (var suiteName in measuredValues.tests) {
+                    var suite = measuredValues.tests[suiteName];
                     for (var testName in suite.tests) {
                         var test = suite.tests[testName];
                         for (var subtestName in test.tests)
@@ -66,6 +68,8 @@
                 }
             });
 
+            PerfTestRunner.reportValues(createTest(null, null, false, 'pt'), scores);
+
             var fullNames = new Array;
             for (var fullName in measuredValuesByFullName)
                 fullNames.push(fullName);