proc

package
v1.10.26 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 14 Imported by: 11

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 AddShutdownListener

func AddShutdownListener(fn func()) (waitForCalled func())

func AddWrapUpListener

func AddWrapUpListener(fn func()) (waitForCalled func())

func Env

func Env(name string) string

func EnvInt

func EnvInt(name string) (int, bool)

func Pid

func Pid() int

func ProcessName

func ProcessName() string

func SetTimeToForceQuit

func SetTimeToForceQuit(duration time.Duration)

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.

type Stopper

type Stopper interface {
	Stop()
}

func StartProfile

func StartProfile() Stopper

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

Jump to

Keyboard shortcuts

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