mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Clean up cpuio profiling (#14838)
Don't start regular cpu profile as well. Use bed madmin const.
This commit is contained in:
parent
96f27a4965
commit
13ba4b433d
@ -320,8 +320,7 @@ func startProfiler(profilerType string) (minioProfiler, error) {
|
||||
defer os.RemoveAll(dirPath)
|
||||
return ioutil.ReadFile(fn)
|
||||
}
|
||||
// TODO(klauspost): Replace with madmin.ProfilerCPUIO on next update.
|
||||
case "cpuio":
|
||||
case madmin.ProfilerCPUIO:
|
||||
// at 10k or more goroutines fgprof is likely to become
|
||||
// unable to maintain its sampling rate and to significantly
|
||||
// degrade the performance of your application
|
||||
@ -339,10 +338,6 @@ func startProfiler(profilerType string) (minioProfiler, error) {
|
||||
return nil, err
|
||||
}
|
||||
stop := fgprof.Start(f, fgprof.FormatPprof)
|
||||
err = pprof.StartCPUProfile(f)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
prof.stopFn = func() ([]byte, error) {
|
||||
err := stop()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user