You need the -benchmem flag to get a report of allocations:

$ go test -bench=. -benchmem
goos: darwin
goarch: amd64
BenchmarkTestSleep_2000-4           1 2005447537 ns/op      456 B/op
     3 allocs/op
BenchmarkTestSleep_1000-4           1 1001627153 ns/op       64 B/op
     1 allocs/op
BenchmarkTestSleep_500-4           2 500908757 ns/op       36 B/op
   1 allocs/op
BenchmarkTestSleep_100-4          10 101720516 ns/op        6 B/op
   0 allocs/op
BenchmarkTestSleep_10-4           100   12494871 ns/op        0 B/op
     0 allocs/op
PASS
ok  _/tmp 6.911s

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to