mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
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
This commit is contained in:
parent
75a0661213
commit
23a0415eb7
@ -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…
Reference in New Issue
Block a user