cpuquota

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUQuota

func CPUQuota(cg cgroups.CGroups) (float64, bool, error)

CPUQuota returns the CPU quota applied with the CPU cgroup controller. It is a result of `cpu.cfs_quota_us / cpu.cfs_period_us`. If the value of `cpu.cfs_quota_us` was not set (-1), the method returns `(-1, nil)`.

func NewCGroupsForCurrentProcess

func NewCGroupsForCurrentProcess() (cgroups.CGroups, error)

NewCGroupsForCurrentProcess returns a new *CGroups instance for the current process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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