Documentation ¶
Index ¶
Constants ¶
View Source
const CPUFilename = "status_cpu.prof"
CPUFilename is a filename in which the CPU profiling is stored.
View Source
const MemFilename = "status_mem.prof"
MemFilename is a filename in which the memory profiling is stored.
Variables ¶
This section is empty.
Functions ¶
func StartCPUProfile ¶
StartCPUProfile enables CPU profiling for the current process. While profiling, the profile will be buffered and written to the file in folder dataDir.
func StopCPUProfile ¶
func StopCPUProfile() error
StopCPUProfile stops the current CPU profile, if any, and closes the file.
func WriteHeapFile ¶
WriteHeapFile writes heap memory to the file.
Types ¶
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler runs and controls a HTTP pprof interface.
func NewProfiler ¶
NewProfiler creates an instance of the profiler with the given port.
Click to show internal directories.
Click to hide internal directories.