package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
CPUQuotaToGOMAXPROCS converts the CPU quota applied to the calling process to a valid GOMAXPROCS value.
GetCgroupCPU returns the CPU usage and quota for the current cgroup.
GetCgroupMemLimit attempts to retrieve the cgroup memory limit for the current process, and return cgroup version too.
GetCPUPeriodAndQuota returns CPU period and quota time of cgroup.
GetMemoryInactiveFileUsage attempts to retrieve the cgroup memory usage value (in bytes) for the current process.
GetMemoryLimit attempts to retrieve the cgroup memory limit for the current process.
GetMemoryUsage attempts to retrieve the cgroup memory usage value (in bytes) for the current process.
InContainer returns true if the process is running in a container.
SetGOMAXPROCS is to set GOMAXPROCS to the number of CPUs.
# Constants
CPUQuotaMinUsed is return when CPU quota is smaller than the min value.
CPUQuotaUndefined is returned when CPU quota is undefined.
CPUQuotaUsed is returned when a valid CPU quota can be used.
cgroup versions.
cgroup versions.
cgroup versions.
# Type aliases
CPUQuotaStatus presents the status of how CPU quota is used.
Version represents the cgroup version.