pprof

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Use the pprof tool

Then use the pprof tool to look at the heap profile:

go tool pprof http://localhost:9999/debug/pprof/heap

Or to look at a 30-second CPU profile:

go tool pprof http://localhost:9999/debug/pprof/profile

Or to look at the goroutine blocking profile, after calling runtime.SetBlockProfileRate in your program:

go tool pprof http://localhost:9999/debug/pprof/block

Or to collect a 5-second execution trace:

wget http://localhost:9999/debug/pprof/trace?seconds=5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = StdConfig().Build()
)

Functions

This section is empty.

Types

type Config added in v1.0.0

type Config struct {
}

func DefaultConfig added in v1.0.0

func DefaultConfig() *Config

func StdConfig added in v1.0.0

func StdConfig() *Config

func (*Config) Build added in v1.0.0

func (c *Config) Build() *PProf

func (*Config) Path added in v1.0.0

func (c *Config) Path() string

type PProf

type PProf struct {
	// contains filtered or unexported fields
}

func (*PProf) Name

func (pp *PProf) Name() string

func (*PProf) Serve

func (pp *PProf) Serve(ctx context.Context) error

func (*PProf) Shutdown

func (pp *PProf) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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