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: move gomaxprocs to key-value pair in benchmark output #30056

Open
rsc opened this issue Feb 1, 2019 · 1 comment
Open

testing: move gomaxprocs to key-value pair in benchmark output #30056

rsc opened this issue Feb 1, 2019 · 1 comment
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 1, 2019

It's been a few releases since we introduced the new key: value syntax in benchmark output. When we first introduced it, we left the -P suffix to signal the GOMAXPROCS setting, to avoid disruption for tools that didn't know about the new syntax. At this point I think we can safely move that into the key-value sections, cleaning up the main output lines.

That is, this output from go test -bench=Parallel64 -benchtime=0.1s -count=5 -cpu=1,2,4 -run=XXX net/http:

goos: darwin
goarch: amd64
pkg: net/http
BenchmarkClientServerParallel64     	    2000	     76182 ns/op	    5503 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     86365 ns/op	    5610 B/op	      64 allocs/op
BenchmarkClientServerParallel64     	    2000	     81944 ns/op	    5485 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     79690 ns/op	    5488 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     98858 ns/op	    5481 B/op	      64 allocs/op
BenchmarkClientServerParallel64-2   	    1000	    150096 ns/op	    9203 B/op	      81 allocs/op
BenchmarkClientServerParallel64-2   	    1000	    147771 ns/op	    8820 B/op	      78 allocs/op
BenchmarkClientServerParallel64-2   	    1000	    251588 ns/op	    9759 B/op	      81 allocs/op
BenchmarkClientServerParallel64-2   	     500	    241765 ns/op	   11516 B/op	      87 allocs/op
BenchmarkClientServerParallel64-2   	     500	    262960 ns/op	   11397 B/op	      86 allocs/op
BenchmarkClientServerParallel64-4   	     200	    634660 ns/op	   16159 B/op	     116 allocs/op
BenchmarkClientServerParallel64-4   	     100	   1377371 ns/op	   17915 B/op	     126 allocs/op
BenchmarkClientServerParallel64-4   	     200	    576365 ns/op	   15874 B/op	     114 allocs/op
BenchmarkClientServerParallel64-4   	     200	    516387 ns/op	   14173 B/op	     112 allocs/op
BenchmarkClientServerParallel64-4   	     200	    515807 ns/op	   14572 B/op	     113 allocs/op

would become this output:

goos: darwin
goarch: amd64
pkg: net/http
gomaxprocs: 1
BenchmarkClientServerParallel64     	    2000	     76182 ns/op	    5503 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     86365 ns/op	    5610 B/op	      64 allocs/op
BenchmarkClientServerParallel64     	    2000	     81944 ns/op	    5485 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     79690 ns/op	    5488 B/op	      63 allocs/op
BenchmarkClientServerParallel64     	    2000	     98858 ns/op	    5481 B/op	      64 allocs/op
gomaxprocs: 2
BenchmarkClientServerParallel64     	    1000	    150096 ns/op	    9203 B/op	      81 allocs/op
BenchmarkClientServerParallel64     	    1000	    147771 ns/op	    8820 B/op	      78 allocs/op
BenchmarkClientServerParallel64     	    1000	    251588 ns/op	    9759 B/op	      81 allocs/op
BenchmarkClientServerParallel64     	     500	    241765 ns/op	   11516 B/op	      87 allocs/op
BenchmarkClientServerParallel64     	     500	    262960 ns/op	   11397 B/op	      86 allocs/op
gomaxprocs: 4
BenchmarkClientServerParallel64     	     200	    634660 ns/op	   16159 B/op	     116 allocs/op
BenchmarkClientServerParallel64     	     100	   1377371 ns/op	   17915 B/op	     126 allocs/op
BenchmarkClientServerParallel64     	     200	    576365 ns/op	   15874 B/op	     114 allocs/op
BenchmarkClientServerParallel64     	     200	    516387 ns/op	   14173 B/op	     112 allocs/op
BenchmarkClientServerParallel64     	     200	    515807 ns/op	   14572 B/op	     113 allocs/op

/cc @aclements

@rsc rsc added this to the Go1.13 milestone Feb 1, 2019
@rsc rsc added the early-in-cycle A change that should be done early in the 3 month dev cycle. label Feb 1, 2019
@aclements
Copy link
Member

It's not clear to me that there will be any less tool breakage at this point than there would have been in the past, though I also suspect there aren't many tools outside of the ones we write that particularly care. Do benchstat and benchsave handle this smoothly today? (Do we have any other tools that would care?)

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 28, 2019
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants