Documentation
¶
Overview ¶
Package profile provides simple profiling for Go applications.
Index ¶
- func AllProfiles(p *Profile)
- func BlockProfile(p *Profile)
- func CPUProfile(p *Profile)
- func ConfigEnvVar(key string) func(*Profile)
- func GoroutineProfile(p *Profile)
- func MemProfile(p *Profile)
- func MutexProfile(p *Profile)
- func NoShutdownHook(p *Profile)
- func Quiet(p *Profile)
- func ThreadcreationProfile(p *Profile)
- func TraceProfile(p *Profile)
- func WithLogger(l *log.Logger) func(p *Profile)
- type Profile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllProfiles ¶
func AllProfiles(p *Profile)
AllProfiles enables all profiling types. Running all profiles at once is generally not a good idea, so it's recommended that this option is combined with some configuration mechanism, via flags or otherwise.
func BlockProfile ¶
func BlockProfile(p *Profile)
BlockProfile enables block (contention) profiling.
func ConfigEnvVar ¶
ConfigEnvVar specifies an environment variable to configure profiles from.
func GoroutineProfile ¶
func GoroutineProfile(p *Profile)
GoroutineProfile enables goroutine profiling.
func NoShutdownHook ¶
func NoShutdownHook(p *Profile)
NoShutdownHook controls whether the profiling session should shutdown on interrupt. Programs with more sophisticated signal handling should use this option to disable the default shutdown handler, and ensure the profile Stop() method is called during shutdown.
func ThreadcreationProfile ¶
func ThreadcreationProfile(p *Profile)
ThreadcreationProfile enables thread creation profiling.
func WithLogger ¶
WithLogger configures informational messages to be logged to the given logger. Defaults to the standard library global logger.
Types ¶
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
Profile represents a profiling session.