Documentation
¶
Overview ¶
Package profiling provides helpers for CPU and memory profiling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPprofServer ¶ added in v1.86.0
StartPprofServer starts an HTTP server exposing Go runtime profiling endpoints at /debug/pprof/ on the given addr. It binds the listener synchronously and returns an error if the address is unavailable. The server runs in a background goroutine and shuts down when ctx is cancelled. addr must be a TCP host:port address (e.g. "127.0.0.1:6060"); unix://, npipe://, and fd:// schemes are not supported. Prefer a loopback address over a bare port (":6060") — the latter binds all interfaces, exposing process memory and arguments to the network.
Types ¶
Click to show internal directories.
Click to hide internal directories.