runtime

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 6

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

func RegisterFlags(flags *pflag.FlagSet)

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.

Jump to

Keyboard shortcuts

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