x/perf: allow callers to specify precision of benchmark report #57711
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go1.20-20221229-RC00
Does this issue reproduce with the latest release?
I think so (I'm on an RC, so I'd assume so).
What operating system and processor architecture are you using (
go env
)?Debian Linux, x86_64
go env
OutputWhat did you do?
We're running three sets of benchmarks (using the Google benchmark library): "original", "user", and "solution" (see screenshot). We then pipe the benchmarks through benchstat for display to the user.
What did you expect to see?
The "original" is usually much slower than the solution, so when benchstat processes the results, it displays all three benchmarks with the precision of the slowest benchmark, resulting in displayed rounded-down zero values for the solution. It would be better if these zero values weren't rounded down, but instead displayed, for example, 0.234 microseconds (instead of just 0 microseconds).
What did you see instead?
The text was updated successfully, but these errors were encountered: