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

testing: lost ns/op precision for fast benchmarks [regression] #30997

Closed
josharian opened this issue Mar 22, 2019 · 1 comment
Closed

testing: lost ns/op precision for fast benchmarks [regression] #30997

josharian opened this issue Mar 22, 2019 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@josharian
Copy link
Contributor

josharian commented Mar 22, 2019

CL 166717 caused a regression in benchmark ns/op printing precision.

We now get benchmark output like:

BenchmarkFast-8     	380491575	         3.00 ns/op

Previously, we got:

BenchmarkFast-8     	380491575	         3.12 ns/op

This is due to a change in BenchmarkResult.String. Previously, when ns/op was small, it recalculated it to get extra precision and had special print handling. Now it always uses the results of BenchmarkResult.NsPerOp, which returns an int64.

cc @aclements

@josharian josharian added this to the Go1.13 milestone Mar 22, 2019
@josharian josharian added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 22, 2019
@gopherbot
Copy link

gopherbot commented Mar 22, 2019

Change https://golang.org/cl/168937 mentions this issue: testing: fix fractional ns/op printing

@golang golang locked and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants