profile

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProfilingNotInProgressError = errors.New("CPU profiling not in progress")
	BlockProfileNotExistError   = errors.New("Block profile does not exist")
)
View Source
var Handler = new(HandlerT)

Handler is the global debugging handler.

Functions

func Start

func Start(ctx *cli.Context) error

Start profiling

func StartPProfWebUi

func StartPProfWebUi(address string)

func Stop

func Stop()

Stops all running profiles, flushing their output to the respective file.

Types

type HandlerT

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

HandlerT implements the debugging API. Do not create values of this type, use the one in the Handler variable instead.

func (*HandlerT) MemStats

func (*HandlerT) MemStats() *runtime.MemStats

MemStats returns detailed runtime memory statistics.

func (*HandlerT) StartBlockingProfile

func (h *HandlerT) StartBlockingProfile(rate int, file string) error

StartBlockingProfile starts blocking profiling. rate 0 disables block profiling.

func (*HandlerT) StartCPUProfile

func (h *HandlerT) StartCPUProfile(file string) error

StartCPUProfile turns on CPU profiling, writing to the given file.

func (*HandlerT) StartGoTrace

func (h *HandlerT) StartGoTrace(file string) error

tracing StartGoTrace turns on tracing, writing to the given file.

func (*HandlerT) StartMemProfile

func (h *HandlerT) StartMemProfile(rate int, file string) error

StartMemProfile starts the memory profiling rate that controls the fraction of memory allocations that are recorded and reported in the memory profile.

func (*HandlerT) StopBlockingProfile

func (h *HandlerT) StopBlockingProfile() error

StopBlockProfile stops an ongoing blocking profile

func (*HandlerT) StopCPUProfile

func (h *HandlerT) StopCPUProfile() error

StopCPUProfile stops an ongoing CPU profile.

func (*HandlerT) StopGoTrace

func (h *HandlerT) StopGoTrace() error

StopTrace stops an ongoing trace.

func (*HandlerT) StopMemHeapProfile

func (h *HandlerT) StopMemHeapProfile() error

StopMemHeapProfile stops an ongoing memory heap profile

Jump to

Keyboard shortcuts

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