hwstats

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: Apache-2.0 Imports: 14 Imported by: 11 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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