pprofutils

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exports = map[string]any{
	"StartCPUAndMemoryProfile": StartCPUAndMemoryProfile,
	"StartCPUProfile":          StartCPUProfile,
	"StartMemoryProfile":       StartMemoryProfile,

	"cpuProfilePath":       WithCPUProfileFile,
	"memProfilePath":       WithMemProfileFile,
	"ctx":                  WithContext,
	"onCPUProfileFinished": WithOnCPUProfileFinished,
	"onCPUProfileStarted":  WithOnCPUProfileStarted,
	"onMemProfileStarted":  WithOnMemProfileStarted,
	"onMemProfileFinished": WithOnMemProfileFinished,
	"timeout":              WithTimeout,
	"callback":             WithFinished,
}

Functions

func StartCPUAndMemoryProfile

func StartCPUAndMemoryProfile(opts ...Option) error

func StartCPUProfile

func StartCPUProfile(opts ...Option) error

func StartMemoryProfile

func StartMemoryProfile(opts ...Option) error

Types

type Config

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

func NewConfig

func NewConfig() *Config

type Option

type Option func(*Config)

func WithCPUProfileFile

func WithCPUProfileFile(file string) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithFinished

func WithFinished(h func(string)) Option

func WithMemProfileFile

func WithMemProfileFile(file string) Option

func WithOnCPUProfileFinished

func WithOnCPUProfileFinished(fn func(string, error)) Option

func WithOnCPUProfileStarted

func WithOnCPUProfileStarted(fn func(string)) Option

func WithOnMemProfileFinished

func WithOnMemProfileFinished(fn func(string, error)) Option

func WithOnMemProfileStarted

func WithOnMemProfileStarted(fn func(string)) Option

func WithTimeout

func WithTimeout(i float64) Option

Jump to

Keyboard shortcuts

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