Skip to content

Add measurePrepare param #440

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

Merged
merged 19 commits into from
May 27, 2025

Conversation

camillobruni
Copy link
Contributor

  • Include the suite prepare time in total time if param.debugMetrics is set
  • Add SuiteRunner._suiteResults local variable

@camillobruni camillobruni requested review from julienw and rniwa October 23, 2024 14:56
@camillobruni camillobruni marked this pull request as draft October 23, 2024 15:03
@rniwa
Copy link
Member

rniwa commented Oct 23, 2024

What is the purpose of this change? Why do we ever want to include the prepare time in the total?

@camillobruni
Copy link
Contributor Author

This is useful for debugging and internal testing.

We sometimes run the Speedometer workloads internally including the startup time with a live network.
Given that Speedometer is well-controlled this makes for a nice end2end browser test.

@camillobruni camillobruni marked this pull request as ready for review October 23, 2024 15:54
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 for implementing my request!

To be honest I find the patch difficult to follow, because you've put a lot of things together in the same commit: how you deal with measuredValues, the checkbox UI, the prepare phase record. It would be good if you can split it in several meaningful commits. (no need to have separate PR).

Also I would like that we remove the first iteration when computing the average of the Prepare phase, because it's so different. What do you think?

Comment on lines 574 to 575
if (params.debugMetrics)
this._recordPrepareMetric(entry.duration);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer to always record it, but never add it to total. And then I'm not sure we need the parameter debugMetrics anymore?


let label = document.createElement("label");
label.append(check, " ", span("Use Warmup Suite"));
function createCheckboxUI(labelValue, initialValue) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add the callback as a parameter and add it in this function. This would make the callers a lot leaner.

Also it would be good to use an option parameter { labelValue, initialValue, onChange } for a better readability at the caller site.

@camillobruni camillobruni marked this pull request as draft November 4, 2024 10:35
@camillobruni
Copy link
Contributor Author

To simplify discussions on this PR, I'm splitting off the refactoring parts into separate PRs.

@camillobruni camillobruni changed the title Add debugMetrics param Add measurePrepare param Jan 7, 2025
Copy link

netlify bot commented May 21, 2025

Deploy Preview for webkit-speedometer-preview ready!

Name Link
🔨 Latest commit 768ab21
🔍 Latest deploy log https://app.netlify.com/projects/webkit-speedometer-preview/deploys/6835cb75d06a9300088d0cd6
😎 Deploy Preview https://deploy-preview-440--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.

@camillobruni camillobruni marked this pull request as ready for review May 21, 2025 12:23
@camillobruni camillobruni merged commit 0746a31 into WebKit:main May 27, 2025
8 checks passed
@camillobruni camillobruni deleted the 2024-10-23_total_metric branch May 27, 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.

3 participants