pprof

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DisableEnvVarKey is the environment variable name to disable the pprof server.
	// If this environment variable is set to any value, the pprof server will not be started.
	DisableEnvVarKey = "DISABLE_PPROF"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context)

Run the pprof server if the DISABLE_PPROF environment variable is not set. This is non-blocking and will run the pprof server in a separate goroutine until the provided context is cancelled.

Enabling the pprof server by default helps with debugging performance issues in production. The impact should be negligible when the actual pprof endpoints are not being accessed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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