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: document -test.benchmem and ReportAllocs output format #42239

Open
ianlancetaylor opened this issue Oct 28, 2020 · 1 comment
Open

testing: document -test.benchmem and ReportAllocs output format #42239

ianlancetaylor opened this issue Oct 28, 2020 · 1 comment

Comments

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 28, 2020

Filing this bug on behalf of someone who prefers not to do it directly:

The ⁠(*testing.B).ReportAllocs function's documentation says that its output is the same as setting -test.benchmem. However, there is as far as I can tell no explanation anywhere of what, exactly, -test.benchmem is or what it does. There is also no explanation as to what the output format is. For instance, in an output line like

BenchmarkF-34         	    9718	    672043 ns/op	   34474 B/op	     508 allocs/op

I can see the lines with four numbers, but one of them is completely dimensionless and the others aren't entirely clear.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 31, 2020

Change https://golang.org/cl/266917 mentions this issue: testing: document -benchmem flag output format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.