pprof

package
v0.0.0-...-9a57a4e Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: BSD-3-Clause, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRaw

func GetRaw(opts Options, remaining []string) ([]byte, error)

GetRaw returns the raw output from pprof for the given options.

func ParseRaw

func ParseRaw(input []byte) (*stack.Profile, error)

ParseRaw parses the raw pprof output and returns call stacks.

func SelectSample

func SelectSample(args, names []string) int

SelectSample returns the index of the sample to use given the sample names.

Types

type Options

type Options struct {
	BaseURL     string   `short:"u" long:"url" default:"http://localhost:8080" description:"Base URL of your Go program"`
	URLSuffix   string   `long:"suffix" default:"/debug/pprof/profile" description:"URL path of pprof profile"`
	BinaryFile  string   `` /* 158-byte string literal not displayed */
	BinaryName  string   `long:"binaryname" description:"File path of the binary that the binaryinput is for, used for pprof inputs"`
	TimeSeconds int      `short:"t" long:"seconds" default:"30" description:"Number of seconds to profile for"`
	ExtraArgs   []string `long:"pprofArgs"  description:"Extra arguments for pprof"`
	TimeAlias   *int     `hidden:"true" long:"time" description:"Alias for backwards compatibility"`
}

Options are parameters for pprof.

Jump to

Keyboard shortcuts

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