Documentation ¶
Overview ¶
Package driver implements the core pprof functionality. It can be parameterized with a flag implementation, fetch and symbolize mechanisms.
Index ¶
- Variables
- func AddCommand(cmd string, format int, post PostProcessor, desc, usage string)
- func ArticleHandler(w http.ResponseWriter, r *http.Request)
- func GenerateRawReport(p *profile.Profile, cmd []string, cfg PprofConfig, o *plugin.Options) (*command, *report.Report, error)
- 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 (f *GoFlags) ExtraUsage() string
- func (*GoFlags) Float64(o string, d float64, c string) *float64
- func (*GoFlags) Int(o string, d int, c string) *int
- func (*GoFlags) Parse(usage func()) []string
- func (*GoFlags) String(o, d, c string) *string
- func (*GoFlags) StringList(o, d, c string) *[]*string
- type PostProcessor
- type PprofConfig
Constants ¶
This section is empty.
Variables ¶
var DataStoreEndpoint string
var FlagNoDataStore = false
var GhOrg = "HdrHistogram"
var GhRepo = "hdrhistogram-go"
var GitHash = "494271c4c016b36c8cee88480288f33b419cf7b0"
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 ArticleHandler ¶
func ArticleHandler(w http.ResponseWriter, r *http.Request)
func GenerateRawReport ¶
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) StringList ¶
StringList implements the plugin.FlagSet interface.
type PostProcessor ¶
PostProcessor is a function that applies post-processing to the report output
type PprofConfig ¶
type PprofConfig struct { // Filename for file-based output formats, stdout by default. Output string `json:"-"` // Display options. CallTree bool `json:"call_tree,omitempty"` RelativePercentages bool `json:"relative_percentages,omitempty"` Unit string `json:"unit,omitempty"` CompactLabels bool `json:"compact_labels,omitempty"` SourcePath string `json:"-"` TrimPath string `json:"-"` IntelSyntax bool `json:"intel_syntax,omitempty"` Mean bool `json:"mean,omitempty"` SampleIndex string `json:"-"` DivideBy float64 `json:"-"` Normalize bool `json:"normalize,omitempty"` Sort string `json:"sort,omitempty"` // Filtering options DropNegative bool `json:"drop_negative,omitempty"` NodeCount int `json:"nodecount,omitempty"` NodeFraction float64 `json:"nodefraction,omitempty"` EdgeFraction float64 `json:"edgefraction,omitempty"` Trim bool `json:"trim,omitempty"` Focus string `json:"focus,omitempty"` Ignore string `json:"ignore,omitempty"` PruneFrom string `json:"prune_from,omitempty"` Hide string `json:"hide,omitempty"` Show string `json:"show,omitempty"` ShowFrom string `json:"show_from,omitempty"` TagFocus string `json:"tagfocus,omitempty"` TagIgnore string `json:"tagignore,omitempty"` TagShow string `json:"tagshow,omitempty"` TagHide string `json:"taghide,omitempty"` NoInlines bool `json:"noinlines,omitempty"` // Output granularity Granularity string `json:"granularity,omitempty"` }
PprofConfig holds settings for a single named PprofConfig. The JSON tag name for a field is used both for JSON encoding and as a named variable.
func DefaultConfig ¶
func DefaultConfig() PprofConfig
DefaultConfig returns the default configuration values; it is unaffected by flags and interactive assignments.