pprof

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MPL-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUProfile

func CPUProfile(ctx context.Context, sec int) ([]byte, map[string]string, error)

CPUProfile generates a CPU Profile for a given duration

func Cmdline

func Cmdline() ([]byte, map[string]string, error)

Cmdline responds with the running program's command line, with arguments separated by NUL bytes.

func IsErrProfileNotFound

func IsErrProfileNotFound(err error) bool

IsErrProfileNotFound returns whether the error is due to a pprof profile being invalid

func NewErrProfileNotFound

func NewErrProfileNotFound(profile string) error

NewErrProfileNotFound returns a new error caused by a pprof.Lookup profile not being found

func Profile

func Profile(profile string, debug, gc int) ([]byte, map[string]string, error)

Profile generates a pprof.Profile report for the given profile name see runtime/pprof/pprof.go for available profiles.

func Trace

func Trace(ctx context.Context, sec int) ([]byte, map[string]string, error)

Trace runs a trace profile for a given duration

Types

type ReqType

type ReqType string
const (
	CmdReq    ReqType = "cmdline"
	CPUReq    ReqType = "cpu"
	TraceReq  ReqType = "trace"
	LookupReq ReqType = "lookup"

	ErrProfileNotFoundPrefix = "Pprof profile not found profile:"
)

Jump to

Keyboard shortcuts

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