commands

package
v0.0.0-...-e040fd4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package commands defines and manages the basic pprof commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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, svgpan **string) 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