Documentation ¶
Index ¶
- Variables
- func Exit()
- func LoudPanic(x interface{})
- func Setup(debugCfg *Config) error
- func StartPProf(address string)
- type Config
- type DebugArgs
- type HandlerT
- func (*HandlerT) BlockProfile(args DebugArgs, reply *bool) error
- func (h *HandlerT) CpuProfile(args DebugArgs, reply *bool) error
- func (*HandlerT) FreeOSMemory(ignore string, reply *bool) error
- func (*HandlerT) GcStats(ignore string, reply *debug.GCStats) error
- func (h *HandlerT) GoTrace(args DebugArgs, reply *bool) error
- func (*HandlerT) MemStats(ignore string, reply *runtime.MemStats) error
- func (*HandlerT) MutexProfile(args DebugArgs, reply *bool) error
- func (*HandlerT) SetGCPercent(v int, reply *int) error
- func (*HandlerT) Stacks(ignore string, reply *[]byte) error
- func (h *HandlerT) StartCPUProfile(file string, reply *bool) error
- func (h *HandlerT) StartGoTrace(file string, reply *bool) error
- func (h *HandlerT) StopCPUProfile(ignore string, reply *bool) error
- func (h *HandlerT) StopGoTrace(ignore string, reply *bool) error
- func (*HandlerT) WriteMemProfile(file string, reply *bool) error
Constants ¶
This section is empty.
Variables ¶
var Handler = new(HandlerT)
Handler is the global debugging handler.
var Memsize memsizeui.Handler
Functions ¶
func Exit ¶
func Exit()
Exit stops all running profiles, flushing their output to the respective file.
func LoudPanic ¶
func LoudPanic(x interface{})
LoudPanic panics in a way that gets all goroutine stacks printed on stderr.
func StartPProf ¶
func StartPProf(address string)
Types ¶
type Config ¶
type Config struct { Pprof bool `mapstructure:"debug-pprof"` PprofPort int `mapstructure:"debug-pprofport"` PprofAddr string `mapstructure:"debug-pprofaddr"` Memprofilerate int `mapstructure:"debug-memprofilerate"` Blockprofilerate int `mapstructure:"debug-blockprofilerate"` Cpuprofile string `mapstructure:"debug-cpuprofile"` Trace string `mapstructure:"debug-trace"` }
func DefaultConfig ¶
func DefaultConfig() *Config
type HandlerT ¶
type HandlerT struct {
// contains filtered or unexported fields
}
HandlerT implements the debugging API. Do not create values of this type, use the one in the Handler variable instead.
func (*HandlerT) BlockProfile ¶
BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.
func (*HandlerT) CpuProfile ¶
CpuProfile turns on CPU profiling for nsec seconds and writesprofile data to file.
func (*HandlerT) FreeOSMemory ¶
FreeOSMemory returns unused memory to the OS.
func (*HandlerT) MutexProfile ¶
MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.
func (*HandlerT) SetGCPercent ¶
SetGCPercent sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.
func (*HandlerT) StartCPUProfile ¶
StartCPUProfile turns on CPU profiling, writing to the given file.
func (*HandlerT) StartGoTrace ¶
StartGoTrace turns on tracing, writing to the given file.
func (*HandlerT) StopCPUProfile ¶
StopCPUProfile stops an ongoing CPU profile.
func (*HandlerT) StopGoTrace ¶
StopGoTrace stops an ongoing trace.