Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uptesting: benchmark performance misaligned for fast tests #30928
Labels
Milestone
Comments
This comment has been minimized.
This comment has been minimized.
/cc @mpvl |
This comment has been minimized.
This comment has been minimized.
Looks like the ns/op are aligned in the example (by decimal point). The iteration counts don't look great, though. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran some fast tests, where each iteration took less than a nanosecond. This led to the results table to be misaligned.
Here's a reproducible example:
What did you expect to see?
What did you see instead?
Thoughts
I guess this has to do with performance numbers being printed as
%8d
, so anything larger than that will get shifted.