mirror of
https://github.com/minio/minio.git
synced 2024-12-27 15:45:55 -05:00
9531cddb06
Two handlers are added to admin API to enable profiling and disable profiling of a server in a standalone mode, or all nodes in the distributed mode. /minio/admin/profiling/start/{cpu,block,mem}: - Start profiling and return starting JSON results, e.g. one node is offline. /minio/admin/profiling/download: - Stop the on-going profiling task - Stream a zip file which contains all profiling files that can be later inspected by go tool pprof
14 lines
186 B
Go
14 lines
186 B
Go
// +build go1.8
|
|
|
|
package profile
|
|
|
|
import "runtime"
|
|
|
|
func enableMutexProfile() {
|
|
runtime.SetMutexProfileFraction(1)
|
|
}
|
|
|
|
func disableMutexProfile() {
|
|
runtime.SetMutexProfileFraction(0)
|
|
}
|