hwstats

package
v1.39.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUStats

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

func NewCPUStats

func NewCPUStats(idleUpdateCallback func(idle float64)) (*CPUStats, error)

func NewProcMonitor added in v1.30.0

func NewProcMonitor(onUpdate func(*ProcStats)) (*CPUStats, error)

func (*CPUStats) GetCPUIdle

func (c *CPUStats) GetCPUIdle() float64

func (*CPUStats) GetCPULoad added in v1.37.0

func (c *CPUStats) GetCPULoad() float64

func (*CPUStats) NumCPU

func (c *CPUStats) NumCPU() float64

func (*CPUStats) Stop

func (c *CPUStats) Stop()

type MemoryStats added in v1.37.0

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

func NewMemoryStats added in v1.37.0

func NewMemoryStats() (*MemoryStats, error)

func (*MemoryStats) GetMemory added in v1.37.0

func (m *MemoryStats) GetMemory() (uint64, uint64, error)

type ProcStats added in v1.30.0

type ProcStats struct {
	CpuIdle     float64
	Cpu         map[int]float64
	MemoryTotal int
	Memory      map[int]int
}

Jump to

Keyboard shortcuts

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