Go: cmd/internal/pprof/commands Index | Files

package commands

import "cmd/internal/pprof/commands"

Package commands defines and manages the basic pprof commands

Index

Package Files

commands.go

type Command Uses

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 Uses

type Commands map[string]*Command

Commands describes the commands accepted by pprof.

func PProf Uses

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

PProf returns the basic pprof report-generation commands

type Completer Uses

type Completer func(prefix string) string

Completer is a function for command-line autocompletion

func NewCompleter Uses

func NewCompleter(cs Commands) Completer

NewCompleter creates an autocompletion function for a set of commands.

type PostProcessor Uses

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

Package commands imports 13 packages (graph) and is imported by 3 packages. Updated 2016-12-18. Refresh now. Tools for package owners.