Skip to content
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

Add debugMetrics param #440

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

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 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.

Comment on lines +85 to +88
this.useWarmupSuite = searchParams.has("useWarmupSuite");
searchParams.delete("useWarmupSuite");
this.debugMetrics = searchParams.has("debugMetrics");
searchParams.delete("debugMetrics");
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we calling "delete" BTW? It's not clear to me...

@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.

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