profiling

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSeconds = 30
View Source
const MaxSeconds = 120

Variables

View Source
var ErrBusy = errors.New("profiling: capture already active")
View Source
var ErrInvalid = errors.New("profiling: invalid capture")

Functions

func Capture

func Capture(ctx context.Context, dst io.Writer, kind string, seconds int) error

func Do

func Do(ctx context.Context, fn func(context.Context), labels ...string)

Do avoids label allocations and runtime label updates outside a capture.

func Enabled

func Enabled() bool

func Validate

func Validate(kind string, seconds int) error

func Windowed

func Windowed(kind string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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