- Revision
- 260656
- Author
- [email protected]
- Date
- 2020-04-24 10:58:55 -0700 (Fri, 24 Apr 2020)
Log Message
MotionMark: ensure that timestamps are valid during warm up phase of tests
https://bugs.webkit.org/show_bug.cgi?id=210640
Reviewed by Said Abou-Hallawa.
Ensure that Benchmark._benchmarkStartTimestamp is set during warm up phase.
Otherwise it is NaN, which makes the Benchmark.timestamp invalid, which is
used by tests like Multiply to drive the animation. When the warm up phase
completes, the start timestamp is reset.
Update minor version of benchmark with this bug fix, and include
version changelog in the about page.
For testing, add a parameter that allows for adjusting the length of the
warm up phase. It remains at its current default, 100 ms.
* MotionMark/about.html: Add section of version changelog. Includes links
to webkit.org blog posts.
* MotionMark/developer.html: Add parameter for setting warmup length.
Remove the Kalman filter parameters, since they should always be fixed.
* MotionMark/resources/runner/motionmark.css: Include styles to show
version log.
* MotionMark/resources/runner/motionmark.js: Factor out default options to
a property on window.benchmarkController. Include the default warmup length
of 100 ms.
(window.benchmarkController.startBenchmark): Refactor to use benchmarkDefaultParameters.
* MotionMark/resources/debug-runner/motionmark.js: Ditto.
* MotionMark/resources/strings.js: Update version number.
* MotionMark/tests/resources/main.js:
(_animateLoop): Set _benchmarkTimestamp during the warmup phase. Check the
warmup length. The _benchmarkTimestamp variable remains reset when the test
begins.
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (260655 => 260656)
--- trunk/PerformanceTests/ChangeLog 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/ChangeLog 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,3 +1,38 @@
+2020-04-24 Jon Lee <[email protected]>
+
+ MotionMark: ensure that timestamps are valid during warm up phase of tests
+ https://bugs.webkit.org/show_bug.cgi?id=210640
+
+ Reviewed by Said Abou-Hallawa.
+
+ Ensure that Benchmark._benchmarkStartTimestamp is set during warm up phase.
+ Otherwise it is NaN, which makes the Benchmark.timestamp invalid, which is
+ used by tests like Multiply to drive the animation. When the warm up phase
+ completes, the start timestamp is reset.
+
+ Update minor version of benchmark with this bug fix, and include
+ version changelog in the about page.
+
+ For testing, add a parameter that allows for adjusting the length of the
+ warm up phase. It remains at its current default, 100 ms.
+
+ * MotionMark/about.html: Add section of version changelog. Includes links
+ to webkit.org blog posts.
+ * MotionMark/developer.html: Add parameter for setting warmup length.
+ Remove the Kalman filter parameters, since they should always be fixed.
+ * MotionMark/resources/runner/motionmark.css: Include styles to show
+ version log.
+ * MotionMark/resources/runner/motionmark.js: Factor out default options to
+ a property on window.benchmarkController. Include the default warmup length
+ of 100 ms.
+ (window.benchmarkController.startBenchmark): Refactor to use benchmarkDefaultParameters.
+ * MotionMark/resources/debug-runner/motionmark.js: Ditto.
+ * MotionMark/resources/strings.js: Update version number.
+ * MotionMark/tests/resources/main.js:
+ (_animateLoop): Set _benchmarkTimestamp during the warmup phase. Check the
+ warmup length. The _benchmarkTimestamp variable remains reset when the test
+ begins.
+
2020-04-07 Saam Barati <[email protected]>
RAMification should have a way of gathering vmmaps for each test at the end of each run
Modified: trunk/PerformanceTests/MotionMark/about.html (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/about.html 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/about.html 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ Copyright (C) 2015-2020 Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -59,7 +59,7 @@
<ul>
<li><strong>Multiply</strong>: CSS border radius, transforms, opacity</li>
<li><strong>Arcs and Fills</strong>: Canvas path fills and arcs</li>
- <li><strong>Leaves</strong>: CSS-transformed elements</li>
+ <li><strong>Leaves</strong>: CSS-transformed elements, opacity</li>
<li><strong>Paths</strong>: Canvas line, quadratic, and Bezier paths</li>
<li><strong>Lines</strong>: Canvas line segments</li>
<li><strong>Focus</strong>: CSS blur filter, opacity</li>
@@ -70,6 +70,14 @@
<p>To achieve consistent results on mobile devices, put the device in landscape orientation. On laptops and desktops, use the default display resolution and make the browser window fullscreen. Make sure that screen automatic display sleep is turned off or set to longer than 8 minutes.</p>
+ <h3>Version log</h3>
+
+ <ul id="log">
+ <li><strong>1.1.1</strong>: Fix bug in the calculation of timestamps used for animation during warm up phase of tests.</li>
+ <li><a href="" Update Multiply test to increase max capacity and expand methods for hiding elements. Update Leaves test to use range of sizes and opacity.</li>
+ <li><a href="" Initial release.</li>
+ </ul>
+
<center><button _onclick_="location.href=''">Return to homepage</button></center>
</div>
</section>
Modified: trunk/PerformanceTests/MotionMark/developer.html (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/developer.html 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/developer.html 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ Copyright (C) 2015-2020 Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -65,6 +65,9 @@
<form name="benchmark-options">
<ul>
<li>
+ <label>Warmup length: <input type="number" id="warmup-length" value="100"> milliseconds</label>
+ </li>
+ <li>
<label>Test length: <input type="number" id="test-interval" value="30"> seconds each</label>
</li>
<li>
@@ -93,13 +96,6 @@
<label>Target frame rate: <input type="number" id="frame-rate" value="50"> FPS</label>
</li>
<li>
- <h3>Kalman filter estimated error:</h3>
- <ul>
- <li><label>Process error (Q): <input type="number" id="kalman-process-error" value="1"></label></li>
- <li><label>Measurement error (R): <input type="number" id="kalman-measurement-error" value="4"></label></li>
- </ul>
- </li>
- <li>
<h3>Time measurement method:</h3>
<ul>
<li><label><input name="time-measurement" type="radio" value="performance" checked> <code>performance.now()</code> (if available)</label></li>
Modified: trunk/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/resources/debug-runner/motionmark.js 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -241,7 +241,7 @@
document.body.classList.add("display-" + optionsManager.valueForOption("display"));
},
-
+
updateTiles: function()
{
document.body.classList.remove("tiles-big");
@@ -615,7 +615,7 @@
startBenchmark: function()
{
benchmarkController.determineCanvasSize();
- benchmarkController.options = optionsManager.updateLocalStorageFromUI();
+ benchmarkController.options = Utilities.mergeObjects(this.benchmarkDefaultParameters, optionsManager.updateLocalStorageFromUI());
benchmarkController.suites = suitesManager.updateLocalStorageFromUI();
this._startBenchmark(benchmarkController.suites, benchmarkController.options, "running-test");
},
Modified: trunk/PerformanceTests/MotionMark/resources/runner/motionmark.css (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/resources/runner/motionmark.css 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/resources/runner/motionmark.css 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -347,6 +347,18 @@
min-width: initial;
transform: skewX(-10deg);
}
+#about h3 {
+ margin-top: 3em;
+}
+#about #log {
+ font-size: .9em;
+ list-style-type: none;
+ margin-left: 0;
+ padding-left: 0;
+}
+#about #log li {
+ margin-top: .5em;
+}
@media screen and (min-width: 667px) {
#about .body {
Modified: trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -457,6 +457,17 @@
};
window.benchmarkController = {
+ benchmarkDefaultParameters: {
+ "test-interval": 30,
+ "display": "minimal",
+ "tiles": "big",
+ "controller": "ramp",
+ "kalman-process-error": 1,
+ "kalman-measurement-error": 4,
+ "time-measurement": "performance",
+ "warmup-length": 100
+ },
+
initialize: function()
{
document.title = Strings.text.title.replace("%s", Strings.version);
@@ -530,15 +541,7 @@
startBenchmark: function()
{
- var options = {
- "test-interval": 30,
- "display": "minimal",
- "tiles": "big",
- "controller": "ramp",
- "kalman-process-error": 1,
- "kalman-measurement-error": 4,
- "time-measurement": "performance"
- };
+ var options = this.benchmarkDefaultParameters;
this._startBenchmark(Suites, options, "test-container");
},
Modified: trunk/PerformanceTests/MotionMark/resources/strings.js (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/resources/strings.js 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/resources/strings.js 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,7 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
var Strings = {
- version: "1.1",
+ version: "1.1.1",
text: {
testName: "Test Name",
score: "Score",
Modified: trunk/PerformanceTests/MotionMark/tests/resources/main.js (260655 => 260656)
--- trunk/PerformanceTests/MotionMark/tests/resources/main.js 2020-04-24 17:56:59 UTC (rev 260655)
+++ trunk/PerformanceTests/MotionMark/tests/resources/main.js 2020-04-24 17:58:55 UTC (rev 260656)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -784,6 +784,7 @@
function(stage, options)
{
this._animateLoop = this._animateLoop.bind(this);
+ this._warmupLength = options["warmup-length"];
this._stage = stage;
this._stage.initialize(this, options);
@@ -866,9 +867,10 @@
}
if (!this._didWarmUp) {
- if (!this._previousTimestamp)
+ if (!this._previousTimestamp) {
this._previousTimestamp = timestamp;
- else if (timestamp - this._previousTimestamp >= 100) {
+ this._benchmarkStartTimestamp = timestamp;
+ } else if (timestamp - this._previousTimestamp >= this._warmupLength) {
this._didWarmUp = true;
this._benchmarkStartTimestamp = timestamp;
this._controller.start(timestamp, this._stage);