cg2

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseCPUUsage       = errors.New("parse cgroups2 cpu usage fails")
	ErrCPUUsageNotUsage    = errors.New("cgroups2 cpu usage not contails `usage_usec`")
	ErrCG2MaxCPUParseFails = errors.New("cgroups2 cpu max fails")
)

Functions

func NewCPULazy

func NewCPULazy(
	done chan struct{},
	conf rescommon.ResourceConfiger,
	dur time.Duration,
) (rescommon.ResourceViewer, error)

func NewCPUSimple

func NewCPUSimple() (rescommon.ResourceViewer, error)

func NewMemLazy

func NewMemLazy(
	done chan struct{},
	conf rescommon.ResourceConfiger,
	dur time.Duration,
) (rescommon.ResourceViewer, error)

func NewMemSimple

func NewMemSimple() (rescommon.ResourceViewer, error)

Types

type CPUCG2Lazy

type CPUCG2Lazy struct {
	// contains filtered or unexported fields
}

func (*CPUCG2Lazy) Used

func (cg *CPUCG2Lazy) Used() float64

type CPUCG2Simple

type CPUCG2Simple struct{}

func (*CPUCG2Simple) Used

func (cg *CPUCG2Simple) Used() float64

type MemCG2Lazy

type MemCG2Lazy struct {
	// contains filtered or unexported fields
}

func (*MemCG2Lazy) Used

func (cg *MemCG2Lazy) Used() float64

type MemCG2Simple

type MemCG2Simple struct{}

func (*MemCG2Simple) Used

func (cg *MemCG2Simple) Used() float64

Jump to

Keyboard shortcuts

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