Title: [232565] trunk/PerformanceTests
Revision
232565
Author
[email protected]
Date
2018-06-06 17:45:34 -0700 (Wed, 06 Jun 2018)

Log Message

Allow the ramp controller to run tests that take less time than the initial ramp-up phase
https://bugs.webkit.org/show_bug.cgi?id=186257

Reviewed by Said Abou-Hallawa.

* MotionMark/tests/resources/main.js: Extend the desired end timestamp when ramp-up occurs.
Previously the controller assumed that the duration of the test was always longer than the
time it took to figure out the order of magnitude of particles to render. When that range
is determined, the end timestamp is then extended. If the duration is too short, the controller
would throw an exception. The fix is to continue extending the timestamp every time the order of
magnitude tiers up.

In general testing with really short durations isn't practical, but sometimes it is
desired for debugging.

To avoid confusion of the private variables, I renamed Benchmark._startTimestamp to
Benchmark._benchmarkStartTimestamp, to disambiguate from Controller._startTimestamp.
Benchmark._startTimestamp is set once and never changed, after the initial 100ms warm-up.
Controller._startTimestamp is initialized to 0 (which means "not initialized"), and then after
the warm up is complete, set in Controller.start() to the same wall clock timestamp, and never
changed afterwards.

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (232564 => 232565)


--- trunk/PerformanceTests/ChangeLog	2018-06-07 00:42:43 UTC (rev 232564)
+++ trunk/PerformanceTests/ChangeLog	2018-06-07 00:45:34 UTC (rev 232565)
@@ -1,5 +1,29 @@
 2018-06-06  Jon Lee  <[email protected]>
 
+        Allow the ramp controller to run tests that take less time than the initial ramp-up phase
+        https://bugs.webkit.org/show_bug.cgi?id=186257
+
+        Reviewed by Said Abou-Hallawa.
+
+        * MotionMark/tests/resources/main.js: Extend the desired end timestamp when ramp-up occurs.
+        Previously the controller assumed that the duration of the test was always longer than the
+        time it took to figure out the order of magnitude of particles to render. When that range
+        is determined, the end timestamp is then extended. If the duration is too short, the controller
+        would throw an exception. The fix is to continue extending the timestamp every time the order of
+        magnitude tiers up.
+
+        In general testing with really short durations isn't practical, but sometimes it is
+        desired for debugging.
+
+        To avoid confusion of the private variables, I renamed Benchmark._startTimestamp to
+        Benchmark._benchmarkStartTimestamp, to disambiguate from Controller._startTimestamp.
+        Benchmark._startTimestamp is set once and never changed, after the initial 100ms warm-up.
+        Controller._startTimestamp is initialized to 0 (which means "not initialized"), and then after
+        the warm up is complete, set in Controller.start() to the same wall clock timestamp, and never
+        changed afterwards.
+
+2018-06-06  Jon Lee  <[email protected]>
+
         Remove unneeded data processing in MotionMark
         https://bugs.webkit.org/show_bug.cgi?id=186256
 

Modified: trunk/PerformanceTests/MotionMark/tests/resources/main.js (232564 => 232565)


--- trunk/PerformanceTests/MotionMark/tests/resources/main.js	2018-06-07 00:42:43 UTC (rev 232564)
+++ trunk/PerformanceTests/MotionMark/tests/resources/main.js	2018-06-07 00:45:34 UTC (rev 232565)
@@ -314,6 +314,8 @@
         this._minimumComplexity = 1;
         this._maximumComplexity = 1;
 
+        this._testLength = options["test-interval"];
+
         // After the tier range is determined, figure out the number of ramp iterations
         var minimumRampLength = 3000;
         var totalRampIterations = Math.max(1, Math.floor(this._endTimestamp / minimumRampLength));
@@ -377,6 +379,7 @@
                 this._lastTierFrameLength = currentFrameLength;
 
                 this._tier += .5;
+                this._endTimestamp = timestamp + this._testLength;
                 var nextTierComplexity = Math.round(Math.pow(10, this._tier));
                 stage.tune(nextTierComplexity - currentComplexity);
 
@@ -394,7 +397,7 @@
             this.intervalSamplingLength = 120;
 
             // Extend the test length so that the full test length is made of the ramps
-            this._endTimestamp += timestamp;
+            this._endTimestamp = timestamp + this._testLength;
             this.mark(Strings.json.samplingStartTimeOffset, timestamp);
 
             this._minimumComplexity = 1;
@@ -823,7 +826,7 @@
 
     get timestamp()
     {
-        return this._currentTimestamp - this._startTimestamp;
+        return this._currentTimestamp - this._benchmarkStartTimestamp;
     },
 
     backgroundColor: function()
@@ -867,7 +870,7 @@
                 this._previousTimestamp = timestamp;
             else if (timestamp - this._previousTimestamp >= 100) {
                 this._didWarmUp = true;
-                this._startTimestamp = timestamp;
+                this._benchmarkStartTimestamp = timestamp;
                 this._controller.start(timestamp, this._stage);
                 this._previousTimestamp = timestamp;
             }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to