Title: [272044] trunk/PerformanceTests
Revision
272044
Author
mmaxfi...@apple.com
Date
2021-01-28 19:42:39 -0800 (Thu, 28 Jan 2021)

Log Message

MotionMark focus test can cause extreme variance in whichever test runs directly after it
https://bugs.webkit.org/show_bug.cgi?id=221075
<rdar://problem/72143661>

Reviewed by Said Abou-Hallawa.

The focus test loads up the window server with work, which runs asynchronously from WebKit's run loop.
This means that the window server can still be busy when the next test starts.

In r270959 we already tried to combat this, and it was mostly successful, but not as successful as we'd
like. This patch goes further by:
1. Bumping up the warmup timeout to 2000ms from 1000ms
2. Making the warmup render at least 30 frames. This means that a single extremely long frame can't
   fill up the entire warmup period.

* MotionMark/developer.html:
* MotionMark/resources/runner/motionmark.js:
(this.clear):
* MotionMark/tests/resources/main.js:
(Benchmark.Utilities.createClass):
(_animateLoop):

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (272043 => 272044)


--- trunk/PerformanceTests/ChangeLog	2021-01-29 02:54:35 UTC (rev 272043)
+++ trunk/PerformanceTests/ChangeLog	2021-01-29 03:42:39 UTC (rev 272044)
@@ -1,3 +1,27 @@
+2021-01-28  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        MotionMark focus test can cause extreme variance in whichever test runs directly after it
+        https://bugs.webkit.org/show_bug.cgi?id=221075
+        <rdar://problem/72143661>
+
+        Reviewed by Said Abou-Hallawa.
+
+        The focus test loads up the window server with work, which runs asynchronously from WebKit's run loop.
+        This means that the window server can still be busy when the next test starts.
+
+        In r270959 we already tried to combat this, and it was mostly successful, but not as successful as we'd
+        like. This patch goes further by:
+        1. Bumping up the warmup timeout to 2000ms from 1000ms
+        2. Making the warmup render at least 30 frames. This means that a single extremely long frame can't
+           fill up the entire warmup period.
+
+        * MotionMark/developer.html:
+        * MotionMark/resources/runner/motionmark.js:
+        (this.clear):
+        * MotionMark/tests/resources/main.js:
+        (Benchmark.Utilities.createClass):
+        (_animateLoop):
+
 2021-01-03  Beth Dakin  <bda...@apple.com>
 
         Remove non-inclusive language from JetStream 2.0

Modified: trunk/PerformanceTests/MotionMark/developer.html (272043 => 272044)


--- trunk/PerformanceTests/MotionMark/developer.html	2021-01-29 02:54:35 UTC (rev 272043)
+++ trunk/PerformanceTests/MotionMark/developer.html	2021-01-29 03:42:39 UTC (rev 272044)
@@ -65,9 +65,15 @@
                         <form name="benchmark-options">
                             <ul>
                                 <li>
-                                    <label>Warmup length: <input type="number" id="warmup-length" value="1000"> milliseconds</label>
+                                    <label>Warmup length: <input type="number" id="warmup-length" value="2000"> milliseconds</label>
                                 </li>
                                 <li>
+                                    <label>Warmup frame count: <input type="number" id="warmup-frame-count" value="30"> frames</label>
+                                </li>
+                                <li>
+                                    <label>First frame minimum length: <input type="number" id="first-frame-minimum-length" value="0"> ms</label>
+                                </li>
+                                <li>
                                     <label>Test length: <input type="number" id="test-interval" value="30"> seconds each</label>
                                 </li>
                                 <li>

Modified: trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js (272043 => 272044)


--- trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js	2021-01-29 02:54:35 UTC (rev 272043)
+++ trunk/PerformanceTests/MotionMark/resources/runner/motionmark.js	2021-01-29 03:42:39 UTC (rev 272044)
@@ -465,7 +465,9 @@
         "kalman-process-error": 1,
         "kalman-measurement-error": 4,
         "time-measurement": "performance",
-        "warmup-length": 1000
+        "warmup-length": 2000,
+        "warmup-frame-count": 30,
+        "first-frame-minimum-length": 0
     },
 
     initialize: function()

Modified: trunk/PerformanceTests/MotionMark/tests/resources/main.js (272043 => 272044)


--- trunk/PerformanceTests/MotionMark/tests/resources/main.js	2021-01-29 02:54:35 UTC (rev 272043)
+++ trunk/PerformanceTests/MotionMark/tests/resources/main.js	2021-01-29 03:42:39 UTC (rev 272044)
@@ -785,6 +785,9 @@
     {
         this._animateLoop = this._animateLoop.bind(this);
         this._warmupLength = options["warmup-length"];
+        this._frameCount = 0;
+        this._warmupFrameCount = options["warmup-frame-count"];
+        this._firstFrameMinimumLength = options["first-frame-minimum-length"];
 
         this._stage = stage;
         this._stage.initialize(this, options);
@@ -870,14 +873,18 @@
             if (!this._previousTimestamp) {
                 this._previousTimestamp = timestamp;
                 this._benchmarkStartTimestamp = timestamp;
-            } else if (timestamp - this._previousTimestamp >= this._warmupLength) {
+            } else if (timestamp - this._previousTimestamp >= this._warmupLength && this._frameCount >= this._warmupFrameCount) {
                 this._didWarmUp = true;
                 this._benchmarkStartTimestamp = timestamp;
                 this._controller.start(timestamp, this._stage);
                 this._previousTimestamp = timestamp;
+
+                while (this._getTimestamp && this._getTimestamp() - timestamp < this._firstFrameMinimumLength) {
+                }
             }
 
             this._stage.animate(0);
+            ++this._frameCount;
             requestAnimationFrame(this._animateLoop);
             return;
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to