cpu

package
v0.0.0-...-63a22fc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUTotalTime

func CPUTotalTime(cpu *procfs.CPUStat) float64

CPUTotalTime adds up all categories

Types

type CPUProbe

type CPUProbe struct {
	Stat *procfs.Stat
}

func NewCPUProbe

func NewCPUProbe(provider StatProvider) (*CPUProbe, error)

NewCPUProbe provides insights into CPU utilization

func (*CPUProbe) Analysis

func (p *CPUProbe) Analysis() (observations []*analysis.Observation)

func (*CPUProbe) Display

func (p *CPUProbe) Display() string

type StatProvider

type StatProvider interface {
	Stat() (procfs.Stat, error)
}

Jump to

Keyboard shortcuts

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