v0.0.0-...-313ecc2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2019 License: BSD-3-Clause, MIT Imports: 13 Imported by: 0



Package commands defines and manages the basic pprof commands



This section is empty.


This section is empty.


This section is empty.


type Command

type Command struct {
	Complete    Completer     // autocomplete for interactive mode
	Format      int           // report format to generate
	PostProcess PostProcessor // postprocessing to run on report
	HasParam    bool          // Collect a parameter from the CLI
	Usage       string        // Help text

Command describes the actions for a pprof command. Includes a function for command-line completion, the report format to use during report generation, any postprocessing functions, and whether the command expects a regexp parameter (typically a function name).

type Commands

type Commands map[string]*Command

Commands describes the commands accepted by pprof.

func PProf

func PProf(c Completer, interactive **bool) Commands

PProf returns the basic pprof report-generation commands

type Completer

type Completer func(prefix string) string

Completer is a function for command-line autocompletion

func NewCompleter

func NewCompleter(cs Commands) Completer

NewCompleter creates an autocompletion function for a set of commands.

type PostProcessor

type PostProcessor func(input *bytes.Buffer, output io.Writer, ui plugin.UI) error

PostProcessor is a function that applies post-processing to the report output

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL