-
Notifications
You must be signed in to change notification settings - Fork 89
Enable Speedometer to use an external config.json file #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for webkit-speedometer-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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.
cb77ab0
to
0f511fe
Compare
There was a problem hiding this 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.
@rniwa - following up, if we're good with the pr. |
resources/shared/params.mjs
Outdated
|
||
try { | ||
const urlObject = new URL(url, "http://www.example.com"); | ||
return urlObject.pathname.toLowerCase().endsWith(".json"); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the extension check
There was a problem hiding this 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.
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
andtags
are not global anymore and thedata-provider
is the source of truth. This is to ensure that thedata-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