Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/198481@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed Feb 10, 2018
1 parent dbec4b4 commit 60baf731c3eb01e10a31fcb89331b0db09b5f658
Showing with 32 additions and 8 deletions.
  1. +21 −0 PerformanceTests/ChangeLog
  2. +0 −1 PerformanceTests/Skipped
  3. +11 −7 PerformanceTests/Speedometer/resources/benchmark-report.js
@@ -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.
@@ -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

@@ -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);

0 comments on commit 60baf73

Please sign in to comment.