Skip to content

Windowed score functions#107

Open
sunnyps wants to merge 5 commits intoWebKit:mainfrom
sunnyps:push-uxvuzzmyknmu
Open

Windowed score functions#107
sunnyps wants to merge 5 commits intoWebKit:mainfrom
sunnyps:push-uxvuzzmyknmu

Conversation

@sunnyps
Copy link

@sunnyps sunnyps commented Mar 5, 2026

Experimental windowed score functions.

This adds "Windowed" and "Windowed Strict" score modes, that can be selected from the Developer page.

Windowed = the best score over a 10% window of samples, reaching 90% or more of the target framerate.
Windowed Strict = the best score over a 10% window of samples, searching from lowest-to-highest complexity, that never drops below 90% of the target framerate.

Note: this is a rebased version of vmiura's PR #89

sunnyps and others added 5 commits March 3, 2026 15:22
Allow changing the score profile on the fly from the results and graph
pages and update computed results, graphs, etc. immediately. This also
affects the data that's used as the source for the "Show Debug Info" and
downloaded JSON.
@netlify
Copy link

netlify bot commented Mar 5, 2026

Deploy Preview for webkit-motionmark-preview ready!

Name Link
🔨 Latest commit f7bf9c8
🔍 Latest deploy log https://app.netlify.com/projects/webkit-motionmark-preview/deploys/69aa144bf6262000088fd8f2
😎 Deploy Preview https://deploy-preview-107--webkit-motionmark-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sunnyps
Copy link
Author

sunnyps commented Mar 5, 2026

More motivation for the windowed fit score profiles:

If you artificially limit the max complexity for a benchmark, say multiply to 1000, so that the browser is able to achieve the target frame rate at that max complexity:

diff --git a/MotionMark/tests/core/resources/multiply.js b/MotionMark/tests/core/resources/multiply.js
index ffec71e..00a4cb2 100644
--- a/MotionMark/tests/core/resources/multiply.js
+++ b/MotionMark/tests/core/resources/multiply.js
@@ -109,7 +109,7 @@ class MultiplyStage extends Stage {

     tune(count)
     {
-        this._offsetIndex = Math.max(0, Math.min(this._offsetIndex + count, this.tiles.length));
+        this._offsetIndex = Math.max(0, Math.min(this._offsetIndex + count, Math.min(this.tiles.length, 1000)));
         this._distanceFactor = 1.5 * (1 - 0.5 * Math.max(this._offsetIndex - this._centerSpiralCount, 0) / this._sidePanelCount) / Math.sqrt(this._offsetIndex);
     }

Then the slope profile fails to find an inflection point and gives a nonsensical result:

7osvMQgeFUT6fA7

While the windowed strict profile gives you the expected result:

AsyZVvEArcZnCr9

return this.s1 + this.t1 * complexity;
}

_windowedFit(samples, desiredFrameLength, windowSize, strict)
Copy link
Contributor

Choose a reason for hiding this comment

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

I get some very long hangs when this JS is running (multiple seconds), so I think we should show a spinner when changing scores, and maybe find way to optimize this JS.

We should also cache the results so that flipping between graphs doesn't involve 20s hangs every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants