Documentation
¶
Overview ¶
Package profile contains profiling utils.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FDArgs ¶
type FDArgs struct {
// BlockFD is the file descriptor to write a block profile to.
// Valid if >=0.
BlockFD int
// CPUFD is the file descriptor to write a CPU profile to.
// Valid if >=0.
CPUFD int
// HeapFD is the file descriptor to write a heap profile to.
// Valid if >=0.
HeapFD int
// MutexFD is the file descriptor to write a mutex profile to.
// Valid if >=0.
MutexFD int
// TraceFD is the file descriptor to write a Go execution trace to.
// Valid if >=0.
TraceFD int
}
FDArgs are the arguments that describe which profiles to enable and which FDs to write them to. Profiling of a given type will only be enabled if the corresponding FD is >=0.
func (*FDArgs) SetFromFlags ¶
SetFromFlags sets the FDArgs from the given flags. The default value for each FD is -1.
type Opts ¶
type Opts struct {
// FDs is a map of profile Kind to FD.
FDs map[Kind]uintptr
// GCInterval is the interval at which to force a garbage collection cycle.
// If zero, GC happens per the Go runtime's default behavior.
GCInterval time.Duration
}
Opts is a struct that holds the options for profiling.
Click to show internal directories.
Click to hide internal directories.