Documentation
¶
Overview ¶
Package profiler is a simple abstraction for easily running runtime profiles and storing the results to files.
Index ¶
Constants ¶
View Source
const ( // Profiler modes. Block = iota Cpu Goroutine Mem Mutex ThreadCreate Trace )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
// Directory path to dump the profile output to. Default is current directory.
DirPath string
// Quiet disables info log output.
Quiet bool
// NoShutdownHook controls whether the profiling package should
// hook SIGINT to automatically Stop().
NoShutdownHook bool
// MemProfileRate is the rate for the memory profiler. Default is 4096.
// To include every allocated block in the profile, set MemProfileRate to 1.
MemProfileRate int
// MemProfileType = heap or alloc. Default is heap.
MemProfileType string
}
Conf contains the profiler config.
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler represents an active profiling session.
Click to show internal directories.
Click to hide internal directories.