Help us shape the future of Go! Take the 2026 Go Developer Survey

profiling

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MonitorGoroutines

func MonitorGoroutines(ctx context.Context, interval time.Duration)

MonitorGoroutines periodically logs goroutine counts

func StartContinuousProfiling added in v1.35.0

func StartContinuousProfiling(appName, serverAddr string) (func(), error)

StartContinuousProfiling starts Pyroscope continuous profiling if serverAddr is non-empty. Returns a stop function (call on shutdown) and any initialization error. When serverAddr is empty, returns a no-op stop function and nil error.

func StartProfiling

func StartProfiling(cfg Config) (func(), error)

StartProfiling enables runtime profiling based on config

Types

type Config

type Config struct {
	Enabled      bool
	HTTPPort     int
	BlockProfile bool
	MutexProfile bool
	CPUProfile   bool
	TraceEnabled bool
	TraceFile    string
}

Config holds profiling configuration

Jump to

Keyboard shortcuts

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