Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProfiler ¶
func NewProfiler(conf Config) *profiler
NewProfiler initialises a new instance of a profiler
Types ¶
type Config ¶
type Config struct { CPU bool `json:"cpu"` // enable CPU profiling Memory bool `json:"memory"` // enable memory profiling Block bool `json:"block"` // enable block profiling Goroutine bool `json:"goroutine"` // enable goroutine profiling Mutex bool `json:"mutex"` // enable contended mutex profiling Prefix string `json:"prefix"` // prefix for the name of the file storing the profiling snapshots Interval string `json:"interval"` // interval between 2 subsequent snapshots MemoryProfileRate int `json:"memory_profile_rate"` // set to 1 to include every allocated block in the profile, 0 to disable CPUProfileRate int `json:"cpu_profile_rate"` // set to a value above zero to enable collection (hz samples per second) MutexProfileFraction int `json:"mutex_profile_fraction"` // set to a value above zero to enable collection }
Config wraps the profiler settings
Click to show internal directories.
Click to hide internal directories.