mirror of
https://github.com/minio/minio.git
synced 2025-04-18 09:50:02 -04: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:
|
case madmin.ProfilerGoroutines:
|
||||||
prof.ext = "txt"
|
prof.ext = "txt"
|
||||||
prof.recordBase("goroutines", 1)
|
prof.recordBase("goroutine", 1)
|
||||||
prof.stopFn = func() ([]byte, error) {
|
prof.stopFn = func() ([]byte, error) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
err := pprof.Lookup("goroutines").WriteTo(&buf, 1)
|
err := pprof.Lookup("goroutine").WriteTo(&buf, 1)
|
||||||
return buf.Bytes(), err
|
return buf.Bytes(), err
|
||||||
}
|
}
|
||||||
case madmin.ProfilerTrace:
|
case madmin.ProfilerTrace:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user