iostatcpu

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FsmCPUHeader = iota
	FsmCPUBody
)
View Source
const (
	Name string = "CPU"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New() *Controller

func (*Controller) GetAverageAfter

func (c *Controller) GetAverageAfter(t time.Time) <-chan common.Sensor

func (*Controller) GetName

func (c *Controller) GetName() string

func (*Controller) Run

func (c *Controller) Run(ctx context.Context, wg *sync.WaitGroup)

func (*Controller) SetMaxM

func (c *Controller) SetMaxM(m int32)

type Sensor

type Sensor struct {
	User   float32
	Nice   float32
	System float32
	IOWait float32
	Steal  float32
	Idle   float32
}

func (*Sensor) Add

func (s *Sensor) Add(a *Sensor)

func (*Sensor) Div

func (s *Sensor) Div(n int32)

func (*Sensor) MakeResponse

func (s *Sensor) MakeResponse() *api.Responce

Jump to

Keyboard shortcuts

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