Skip to content

Fix benchmark startup sequence for testing - #587

Open
camillobruni wants to merge 2 commits into
WebKit:mainfrom
camillobruni:2026-08-31_SpeedometerReady
Open

camillobruni wants to merge 2 commits into
WebKit:mainfrom
camillobruni:2026-08-31_SpeedometerReady

Conversation

@camillobruni

Copy link
Copy Markdown
Contributor

There could be a race condition between sending the SpeedometerReady and and the testing running installing the event handler. This PR delays sending the SpeedometerReady event to a later async point in the evaluateParams method..

@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploy Preview for webkit-speedometer-preview ready!

Name Link
🔨 Latest commit a666699
🔍 Latest deploy log https://app.netlify.com/projects/webkit-speedometer-preview/deploys/6a955fa2403f5000083cc4dd
😎 Deploy Preview https://deploy-preview-587--webkit-speedometer-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@Andrew-Fryer Andrew-Fryer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks good to me. 👍

I like that we won't dispatch "SpeedometerReady" if something in the constructor throws, so there's a bit less risk of silently reporting a wonky benchmark score.

I think it's a bit weird that we dispatch the "SpeedometerReady" from evaluateParams, but we're already calling this.start() from there.

Perhaps we should refactor in a future PR to move these to a callback passed to evaluateParams().then(callback) in the constructor...?

Comment thread resources/main.mjs
_benchmarkConfiguratorPromise = null;
_isInitialized = false;

get isInitialized() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit:
Does this need to be a getter instead of just a method like isRunning and hasFinished?

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.

2 participants