-
Notifications
You must be signed in to change notification settings - Fork 73
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
base: main
Are you sure you want to change the base?
Conversation
camillobruni
commented
Oct 23, 2024
- Include the suite prepare time in total time if param.debugMetrics is set
- Add SuiteRunner._suiteResults local variable
What is the purpose of this change? Why do we ever want to include the prepare time in the total? |
This is useful for debugging and internal testing. We sometimes run the Speedometer workloads internally including the startup time with a live network. |
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 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?
if (params.debugMetrics) | ||
this._recordPrepareMetric(entry.duration); |
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 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) { |
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.
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.
this.useWarmupSuite = searchParams.has("useWarmupSuite"); | ||
searchParams.delete("useWarmupSuite"); | ||
this.debugMetrics = searchParams.has("debugMetrics"); | ||
searchParams.delete("debugMetrics"); |
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.
why are we calling "delete" BTW? It's not clear to me...
To simplify discussions on this PR, I'm splitting off the refactoring parts into separate PRs. |