- Revision
- 227946
- Author
- [email protected]
- Date
- 2018-01-31 17:42:34 -0800 (Wed, 31 Jan 2018)
Log Message
Make run-perf-tests work with StyleBench and re-enable it
https://bugs.webkit.org/show_bug.cgi?id=182322
Reviewed by Antti Koivisto.
This patch updates the test harness to report new metrics of StyleBench.
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.
* StyleBench/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.
* resources/results-template.html: Added "Score" as a metric and "pt" as its unit.
* resources/runner.js:
(PerfTestRunner..finish): Ditto.
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (227945 => 227946)
--- trunk/PerformanceTests/ChangeLog 2018-02-01 01:40:09 UTC (rev 227945)
+++ trunk/PerformanceTests/ChangeLog 2018-02-01 01:42:34 UTC (rev 227946)
@@ -1,3 +1,27 @@
+2018-01-31 Ryosuke Niwa <[email protected]>
+
+ Make run-perf-tests work with StyleBench and re-enable it
+ https://bugs.webkit.org/show_bug.cgi?id=182322
+
+ Reviewed by Antti Koivisto.
+
+ This patch updates the test harness to report new metrics of StyleBench.
+
+ 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.
+ * StyleBench/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.
+ * resources/results-template.html: Added "Score" as a metric and "pt" as its unit.
+ * resources/runner.js:
+ (PerfTestRunner..finish): Ditto.
+
2018-01-30 Ryosuke Niwa <[email protected]>
StyleBench: Generate more mutation steps
Modified: trunk/PerformanceTests/Skipped (227945 => 227946)
--- trunk/PerformanceTests/Skipped 2018-02-01 01:40:09 UTC (rev 227945)
+++ trunk/PerformanceTests/Skipped 2018-02-01 01:42:34 UTC (rev 227946)
@@ -84,7 +84,6 @@
# Don't run the interactive runner. We run index.html
Speedometer/index.html
Speedometer/InteractiveRunner.html
-StyleBench/index.html
StyleBench/InteractiveRunner.html
# We skip Shapes tests for now: https://bugs.webkit.org/show_bug.cgi?id=128188
Modified: trunk/PerformanceTests/StyleBench/resources/benchmark-report.js (227945 => 227946)
--- trunk/PerformanceTests/StyleBench/resources/benchmark-report.js 2018-02-01 01:40:09 UTC (rev 227945)
+++ trunk/PerformanceTests/StyleBench/resources/benchmark-report.js 2018-02-01 01:42:34 UTC (rev 227946)
@@ -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);
Modified: trunk/PerformanceTests/resources/results-template.html (227945 => 227946)
--- trunk/PerformanceTests/resources/results-template.html 2018-02-01 01:40:09 UTC (rev 227945)
+++ trunk/PerformanceTests/resources/results-template.html 2018-02-01 01:42:34 UTC (rev 227946)
@@ -227,7 +227,7 @@
var testResults = [];
var cachedUnit = null;
var cachedScalingFactor = null;
- var unit = {'FrameRate': 'fps', 'Runs': 'runs/s', 'Time': 'ms', 'Malloc': 'bytes', 'JSHeap': 'bytes'}[metric];
+ var unit = {'FrameRate': 'fps', 'Runs': 'runs/s', 'Score': 'pt', 'Time': 'ms', 'Malloc': 'bytes', 'JSHeap': 'bytes'}[metric];
// We can't do this in TestResult because all results for each test need to share the same unit and the same scaling factor.
function computeScalingFactorIfNeeded() {
Modified: trunk/PerformanceTests/resources/runner.js (227945 => 227946)
--- trunk/PerformanceTests/resources/runner.js 2018-02-01 01:40:09 UTC (rev 227945)
+++ trunk/PerformanceTests/resources/runner.js 2018-02-01 01:42:34 UTC (rev 227946)
@@ -223,7 +223,7 @@
var prefix = currentTest.name || '';
if (currentTest.description)
PerfTestRunner.log("Description: " + currentTest.description);
- metric = {'fps': 'FrameRate', 'runs/s': 'Runs', 'ms': 'Time'}[PerfTestRunner.unit];
+ metric = {'fps': 'FrameRate', 'runs/s': 'Runs', 'pt': 'Score', 'ms': 'Time'}[PerfTestRunner.unit];
var suffix = currentTest.aggregator ? ':' + currentTest.aggregator : '';
PerfTestRunner.logStatistics(results, PerfTestRunner.unit, prefix + ":" + metric + suffix);
if (jsHeapResults.length) {