Hello, I have go 1.9 and i am trying to cpu profile a benchmark, but by default the sampling is too low
Duration: 4.89s, Total samples = 1.48s (30.28%)
How can increase the sampling?
Google search game me this:
http://golang.org/pkg/runtime/#SetCPUProfileRate, But when I tried using it, i got this: BenchmarkProc runtime: cannot set cpu profile rate until previous profile has finished.
Here’s how I set this
func BenchmarkProc(b *testing.B) {
runtime.SetCPUProfileRate(1000000)
…
}