Documentation ¶ Index ¶ func Heap(dir string) (err error) func StartCPU(dir string, typ CPUType) (closeFn func() error, err error) type CPUType Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Heap ¶ func Heap(dir string) (err error) func StartCPU ¶ func StartCPU(dir string, typ CPUType) (closeFn func() error, err error) StartCPU starts CPU profiling. If no error, it returns close function that stops and flushes profile to provided directory. NOTE(bwplotka): It does not make sense to run more than one of those. Types ¶ type CPUType ¶ type CPUType string const ( CPUTypeBuiltIn CPUType = "built-in" // CPUProfileTypeFGProf represents enhanced https://github.com/felixge/fgprof profiling. CPUTypeFGProf CPUType = "fgprof" ) Source Files ¶ View all Source files profile.go Click to show internal directories. Click to hide internal directories.