profile

package
v0.0.0-...-45da7de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 9 Imported by: 1

README

profile

Simple profiling support package for Go, fork from github.com/pkg/profile

Documentation

Index

Constants

View Source
const DefaultMemProfileRate = 4096

DefaultMemProfileRate is the default memory profiling rate. See also http://golang.org/pkg/runtime/#pkg-variables

Variables

This section is empty.

Functions

func Specs

func Specs(specs string) func(*Profile)

Specs specifies the profile settings by specifies expression. like cpu,heap,allocs,mutex,block,trace,threadcreate,goroutine,d:5m,rate:4096.

func Start

func Start(options ...func(*Profile)) (interface{ Stop() }, error)

Start starts a new profiling session. The caller should call the Stop method on the value returned to cleanly stop profiling.

Types

type Profile

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

Profile represents an active profiling session.

func (*Profile) Stop

func (p *Profile) Stop()

Stop stops the profile and flushes any unwritten data.

Jump to

Keyboard shortcuts

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