Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableMemory ¶ added in v1.52.0
func AvailableMemory() uint64
AvailableMemory returns 75% of the memory available to this process. It reads GOMEMLIMIT (set by cobraproclimits during startup, which is cgroup-aware in Kubernetes), falling back to cgroup/system detection if GOMEMLIMIT is not set. The 75% ratio provides headroom for memory not tracked by the caller (e.g. goroutine stacks, GC metadata, fragmentation).
func RegisterFlags ¶
RegisterFlags adds flags for configuring profiling rates.
The following flags are added: - "pprof-mutex-profile-rate" - "pprof-block-profile-rate"
func RunE ¶
func RunE() cobrautil.CobraRunFunc
RunE returns a Cobra RunFunc that configures mutex and block profiles.
The required flags can be added to a command by using RegisterFlags().
Types ¶
This section is empty.