profiling: Fix crash when enabling goroutines profiling (#9097)

This commit replaces 'goroutines' with 'goroutine' when passing it
to pprof library when activating goroutine type profiling
master
Anis Elleuch 5 years ago committed by GitHub
parent 75a0661213
commit 23a0415eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/utils.go

@ -324,10 +324,10 @@ func startProfiler(profilerType string) (minioProfiler, error) {
}
case madmin.ProfilerGoroutines:
prof.ext = "txt"
prof.recordBase("goroutines", 1)
prof.recordBase("goroutine", 1)
prof.stopFn = func() ([]byte, error) {
var buf bytes.Buffer
err := pprof.Lookup("goroutines").WriteTo(&buf, 1)
err := pprof.Lookup("goroutine").WriteTo(&buf, 1)
return buf.Bytes(), err
}
case madmin.ProfilerTrace:

Loading…
Cancel
Save