Documentation
¶
Index ¶
Constants ¶
View Source
const ( CpuMode = "cpu" TraceMode = "trace" HeapMode = "heap" AllocsMode = "allocs" MutexMode = "mutex" BlockMode = "block" ThreadCreateMode = "threadcreate" GoroutineMode = "goroutine" FgprofMode = "fgprof" )
Profile modes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Disable the profiler. Easy to set as a command-line flag.
// Default is false.
Disable bool
// Mode is one of cpu, goroutine, threadcreate, heap, allocs, block, mutex.
// Default is empty string and is treated as cpu.
Mode string
// OutputDir where profile must be saved.
// Default is empty string and is treated as ".".
OutputDir string
// FilePrefix for the output file.
// If prefix is specified an additional '_' will be added to the prefix.
FilePrefix string
// UseTextFormat of the resulting pprof file.
// Default is false.
UseTextFormat bool
// FgprofFormat is a format of the output file.
// Default is fgprof.FormatPprof.
FgprofFormat string
// MutexProfileFraction represents the fraction of mutex contention events.
// Default is 10.
MutexProfileFraction int
// BlockProfileRate represents the fraction of goroutine blocking events.
// Default is 10_000.
BlockProfileRate int
}
Config of the profiler.
Click to show internal directories.
Click to hide internal directories.