Title: [228361] trunk/PerformanceTests
Revision
228361
Author
rn...@webkit.org
Date
2018-02-09 22:14:52 -0800 (Fri, 09 Feb 2018)

Log Message

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.

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (228360 => 228361)


--- trunk/PerformanceTests/ChangeLog	2018-02-10 05:43:58 UTC (rev 228360)
+++ trunk/PerformanceTests/ChangeLog	2018-02-10 06:14:52 UTC (rev 228361)
@@ -1,3 +1,24 @@
+2018-02-09  Ryosuke Niwa  <rn...@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.kirsl...@sony.com>
 
         Use REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR on any non-Windows port.

Modified: trunk/PerformanceTests/Skipped (228360 => 228361)


--- trunk/PerformanceTests/Skipped	2018-02-10 05:43:58 UTC (rev 228360)
+++ trunk/PerformanceTests/Skipped	2018-02-10 06:14:52 UTC (rev 228361)
@@ -82,7 +82,6 @@
 Layout/LineLayoutJapanese.html
 
 # Don't run the interactive runner. We run index.html
-Speedometer/index.html
 Speedometer/InteractiveRunner.html
 StyleBench/InteractiveRunner.html
 

Modified: trunk/PerformanceTests/Speedometer/resources/benchmark-report.js (228360 => 228361)


--- trunk/PerformanceTests/Speedometer/resources/benchmark-report.js	2018-02-10 05:43:58 UTC (rev 228360)
+++ trunk/PerformanceTests/Speedometer/resources/benchmark-report.js	2018-02-10 06:14:52 UTC (rev 228361)
@@ -26,21 +26,21 @@
     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'));
@@ -53,9 +53,11 @@
                 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);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to