profiling

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: AGPL-3.0 Imports: 12 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 PrintGoroutineStacks

func PrintGoroutineStacks()

PrintGoroutineStacks prints all goroutine stacks to logs Useful for debugging hangs

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