mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -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)
|
defer os.RemoveAll(dirPath)
|
||||||
return ioutil.ReadFile(fn)
|
return ioutil.ReadFile(fn)
|
||||||
}
|
}
|
||||||
// TODO(klauspost): Replace with madmin.ProfilerCPUIO on next update.
|
case madmin.ProfilerCPUIO:
|
||||||
case "cpuio":
|
|
||||||
// at 10k or more goroutines fgprof is likely to become
|
// at 10k or more goroutines fgprof is likely to become
|
||||||
// unable to maintain its sampling rate and to significantly
|
// unable to maintain its sampling rate and to significantly
|
||||||
// degrade the performance of your application
|
// degrade the performance of your application
|
||||||
@ -339,10 +338,6 @@ func startProfiler(profilerType string) (minioProfiler, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
stop := fgprof.Start(f, fgprof.FormatPprof)
|
stop := fgprof.Start(f, fgprof.FormatPprof)
|
||||||
err = pprof.StartCPUProfile(f)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
prof.stopFn = func() ([]byte, error) {
|
prof.stopFn = func() ([]byte, error) {
|
||||||
err := stop()
|
err := stop()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user