The docs for the -test.memprofilerate flag say "if >= 0", but the code is simply greater, not greater than or equal:
~/go/src/testing$ git grep memProfileRate
testing.go: memProfileRate = flag.Int("test.memprofilerate", 0, "if >=0, sets runtime.MemProfileRate")
testing.go: if *memProfileRate > 0 {
testing.go: runtime.MemProfileRate = *memProfileRate
And the default is 512KB, not 0: https://golang.org/pkg/runtime/#pkg-variables
The docs for the -test.memprofilerate flag say "if >= 0", but the code is simply greater, not greater than or equal:
And the default is 512KB, not 0: https://golang.org/pkg/runtime/#pkg-variables