Skip to content

Conversation

flashdesignory
Copy link
Contributor

@flashdesignory flashdesignory commented Jun 2, 2025

This pr sets up Speedometer to use an optional config url param, to assign different workloads / tests to use with the benchmark.

The initial config.json enables the news site next workload, which is currently the only workload that opted into the postMessage api for it's experimental version. The test name in the config is optional, if the default tests are targeted.

The new `data-provider' checks an allowed list of external urls that the workloads can be pulled in from. Currently this just houses the netlify preview folder.

Other changes:
the suites and tags are not global anymore and the data-provider is the source of truth. This is to ensure that the data-provider can process the suites / tests, prior to running speedometer in any mode.

news-site dist folder changed, since I had to run the build again, after updating shared files from the benchmark.

Preview with config assigned:
https://deploy-preview-515--webkit-speedometer-preview.netlify.app/?config=https://deploy-preview-515--webkit-speedometer-preview.netlify.app/resources/config.json

Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for webkit-speedometer-preview ready!

Name Link
🔨 Latest commit 530759c
🔍 Latest deploy log https://app.netlify.com/projects/webkit-speedometer-preview/deploys/68a5c5f6672eed0007198ed9
😎 Deploy Preview https://deploy-preview-515--webkit-speedometer-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.

Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

I didn't test fully locally and I think I don't get the full picture yet, but here is a first set of comments.

@flashdesignory flashdesignory requested review from rniwa and bgrins July 18, 2025 12:33
Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

Thanks, this looks better.

I still see a small moment at load time where the button is inactive, but this was present before the patch too. Probably because we wait for DOMContentLoaded before calling init/prepareUI. We miught not need this waiting for DOMContentLoaded actually, because we're in a script loaded with type="module"that is always defered. But that's work for another patch IMO.

@flashdesignory
Copy link
Contributor Author

@rniwa - following up, if we're good with the pr.


try {
const urlObject = new URL(url, "http://www.example.com");
return urlObject.pathname.toLowerCase().endsWith(".json");
Copy link
Member

Choose a reason for hiding this comment

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

This isn't necessarily required, right? You can have other file extensions or no file extension at all with Content-Type: application/json.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct, is this a blocker?

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather not have arbitrary rule enforced on a filename.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the extension check

@flashdesignory flashdesignory requested a review from rniwa August 6, 2025 16:05
Copy link
Member

@rniwa rniwa left a comment

Choose a reason for hiding this comment

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

r=me assuming my comments will be addressed.

@flashdesignory flashdesignory merged commit 06449bd into WebKit:main Aug 20, 2025
8 checks passed
@flashdesignory flashdesignory deleted the core/config branch August 20, 2025 14:28
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.

5 participants