profile

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTimes

func PrintTimes() string

PrintTimes prints how much time has passed at each timer.

func SaveMemProfile

func SaveMemProfile(profileDir, identifier string) error

SaveMemProfile saves the current memory structure of the program. An error will be returned if memory profiling is already in progress. Unlike for cpu profiling, there is no 'stopMemProfile' call - everything happens at once.

func StartCPUProfile

func StartCPUProfile(profileDir, identifier string) error

StartCPUProfile starts cpu profiling. An error will be returned if a cpu profiler is already running.

func StartContinuousProfile

func StartContinuousProfile(profileDir string, profileCPU bool, profileMem bool, profileTrace bool)

StartContinuousProfile will continuously print statistics about the cpu usage, memory usage, and runtime stats of the program, and run an execution logger. Select one (recommended) or more functionalities by passing the corresponding flag(s)

func StartTrace added in v1.3.0

func StartTrace(traceDir, identifier string) error

StartTrace starts trace. An error will be returned if a trace is already running.

func StopCPUProfile

func StopCPUProfile()

StopCPUProfile stops cpu profiling.

func StopTrace added in v1.3.0

func StopTrace()

StopTrace stops trace.

func ToggleTimer

func ToggleTimer(s string)

ToggleTimer actives a timer known by a given string. If the timer does not yet exist, it is created.

func Uptime

func Uptime() int64

Uptime() returns the number of nanoseconds that have passed since the first call to uptime.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL