Documentation ¶
Overview ¶
This package implements an interface to interact with the http server behind net/http/pprof We don't need to worry too much about the implementation on the backend, just the interface to it
TODO worry about timeouts on long profiles TODO allow the http fetcher to run profiles for different lengths of time
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpFetcher ¶
type HttpFetcher struct { // default: localhost Server string // default: 6060 Port uint // default: 30s ProfileDuration time.Duration }
Fetches Pprof results from the standard golang pprof server
func (*HttpFetcher) GetFunctionNames ¶
func (f *HttpFetcher) GetFunctionNames(fnPtrs []uint64) (map[uint64]string, error)
Fetch symbols from /debug/pprof/symbol Use a POST request, with function pointers separated by + symbols the response uses the following formatting - "%#x %s\n" for each function pointer and name (see: Symbol in pprof.go)
func (*HttpFetcher) GetProfile ¶
func (f *HttpFetcher) GetProfile() (io.Reader, error)
Fetch a new profile from the http server