Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Heap ¶
Heap creates a heap profile in mem.pprof file in given directory. Directory might be non-existent, heap will create it if needed. NOTE: Given the runtime implementation this setting is global.
func StartCPU ¶
StartCPU starts CPU profiling. If no error is returned, it returns close function that stops and flushes profile to cpu.pprof or cpu.fgprof.pprof file in a given directory. Directory might be non-existent, heap will create it if needed. NOTE: Given the runtime implementation this setting is global.
func StartHeapRecording ¶
func StartHeapRecording(everyAlloc bool)
StartHeapRecording is setting memory profile rate to default value of profiler sample every 512 KB allocated. If `everyAlloc` is true it sets profile rate to sample for every byte allocated. NOTE: Given the runtime implementation this setting is global.
func StartTrace ¶
StartTrace starts tracingIf no error is returned, it returns close function that stops and flushes profile to trace.out file in a given directory. Directory might be non-existent, heap will create it if needed. NOTE: Given the runtime implementation this setting is global.
func StopHeapRecording ¶
func StopHeapRecording()
StopHeapRecording stops heap recording, which will mean that allocation after this function will be not recorded in any heap profile until we resume it. NOTE: Given the runtime implementation this setting is global.