Documentation
¶
Overview ¶
Package driver implements the core pprof functionality. It can be parameterized with a flag implementation, fetch and symbolize mechanisms.
Index ¶
- Constants
- Variables
- func AddCommand(cmd string, format int, post PostProcessor, desc, usage string)
- func NewWebHandler(prefix, path string) *webHandler
- func PProf(eo *plugin.Options) error
- func SetVariableDefault(variable, value string)
- type GoFlags
- func (f *GoFlags) AddExtraUsage(eu string)
- func (*GoFlags) Bool(o string, d bool, c string) *bool
- func (*GoFlags) BoolVar(b *bool, o string, d bool, c string)
- func (f *GoFlags) ExtraUsage() string
- func (*GoFlags) Float64(o string, d float64, c string) *float64
- func (*GoFlags) Float64Var(f *float64, o string, d float64, c string)
- func (*GoFlags) Int(o string, d int, c string) *int
- func (*GoFlags) IntVar(i *int, o string, d int, c string)
- func (*GoFlags) Parse(usage func()) []string
- func (*GoFlags) String(o, d, c string) *string
- func (*GoFlags) StringList(o, d, c string) *[]*string
- func (*GoFlags) StringVar(s *string, o, d, c string)
- type PostProcessor
Constants ¶
const ( ProfileTypeCPU = "cpu" ProfileTypeHeap = "heap" )
Variables ¶
var (
ErrNoProfile = errors.New("no specified profile, please create a cpu or memory profile first.")
)
Functions ¶
func AddCommand ¶
func AddCommand(cmd string, format int, post PostProcessor, desc, usage string)
AddCommand adds an additional command to the set of commands accepted by pprof. This enables extensions to add new commands for specialized visualization formats. If the command specified already exists, it is overwritten.
func NewWebHandler ¶
func NewWebHandler(prefix, path string) *webHandler
func PProf ¶
PProf acquires a profile, and symbolizes it using a profile manager. Then it generates a report formatted according to the options selected through the flags package.
func SetVariableDefault ¶
func SetVariableDefault(variable, value string)
SetVariableDefault sets the default value for a pprof variable. This enables extensions to set their own defaults.
Types ¶
type GoFlags ¶
type GoFlags struct {
UsageMsgs []string
}
GoFlags implements the plugin.FlagSet interface.
func (*GoFlags) AddExtraUsage ¶
AddExtraUsage implements the plugin.FlagSet interface.
func (*GoFlags) ExtraUsage ¶
ExtraUsage implements the plugin.FlagSet interface.
func (*GoFlags) Float64Var ¶
Float64Var implements the plugin.FlagSet interface. the value of the flag.
func (*GoFlags) StringList ¶
StringList implements the plugin.FlagSet interface.