Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions MotionMark/tests/resources/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ class RampController extends Controller {
var nextTierComplexity = Math.max(Math.round(Math.pow(10, this._tier)), currentComplexity + 1);
stage.tune(nextTierComplexity - currentComplexity);

// If the next tier complexity couldn't be set, we've reached the maximum capacity for the test
if (stage.complexity() != nextTierComplexity) {
this._maximumStageComplexity = stage.complexity();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should console.log once per subtest when this happens?

}

// Some tests may be unable to go beyond a certain capacity. If so, don't keep moving up tiers
if (stage.complexity() - currentComplexity > 0 || nextTierComplexity == 1) {
this._tierStartTimestamp = timestamp;
Expand Down Expand Up @@ -520,6 +525,12 @@ class RampController extends Controller {
// If the browser is capable of handling the most complex version of the test, use that
this._maximumComplexity = currentComplexity;
}

if (this._maximumStageComplexity) {
// If we reached the maximum stage complexity, set the maximum such
// that the stage complexity is in the middle of the ramp.
this._maximumComplexity = Math.round(this._maximumStageComplexity * 1.25);
}

this._possibleMaximumComplexity = this._maximumComplexity;

Expand Down Expand Up @@ -616,6 +627,12 @@ class RampController extends Controller {
this._maximumComplexity = Math.max(Math.round(.8 * this._maximumComplexity), this._minimumComplexity + 5);
}

if (this._maximumStageComplexity) {
// If we reached the maximum stage complexity, set the maximum such
// that the stage complexity is in the middle of the ramp.
this._maximumComplexity = Math.min(Math.round(this._maximumStageComplexity * 1.25), this._maximumComplexity);
}

// Next ramp
stage.tune(this._maximumComplexity - stage.complexity());
this._rampDidWarmup = false;
Expand Down