profiler

package
v0.0.0-...-e1e7934 Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: MIT Imports: 6 Imported by: 2

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

Jump to

Keyboard shortcuts

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