Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveAllocProfile ¶
SaveAllocProfile saves an allocation profile to the specified directory.
func SaveHeapProfile ¶
SaveHeapProfile saves a heap profile to the specified directory.
Types ¶
type CPUProfiler ¶
type CPUProfiler struct {
// contains filtered or unexported fields
}
CPUProfiler manages on-demand CPU profiling.
func (*CPUProfiler) StartCPUProfile ¶
func (c *CPUProfiler) StartCPUProfile(profileDir string) error
StartCPUProfile starts CPU profiling, writing to the specified directory when stopped.
func (*CPUProfiler) StopCPUProfile ¶
func (c *CPUProfiler) StopCPUProfile() (string, error)
StopCPUProfile stops CPU profiling and returns the path to the profile file.
type ProfileSession ¶
type ProfileSession struct {
// contains filtered or unexported fields
}
func BeginProfiling ¶
func BeginProfiling(profileDir string, logWriter io.Writer) *ProfileSession
BeginProfiling starts CPU and memory profiling, writing the profiles to the specified directory.
func (*ProfileSession) Stop ¶
func (p *ProfileSession) Stop()
Click to show internal directories.
Click to hide internal directories.