hwstats

package
v1.50.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 17 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

View Source
const CPURequestEnvVar = "LIVEKIT_CPU_REQUEST"

Variables

This section is empty.

Functions

func EffectiveCPURequest added in v1.45.4

func EffectiveCPURequest() float64

EffectiveCPURequest returns the value of LIVEKIT_CPU_REQUEST when set and valid. The result is parsed at most once; use for stats normalization and optional GOMAXPROCS tuning (see utils/hwstats/maxprocs).

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 GroupMemory added in v1.45.1

type GroupMemory struct {
	Total int
	Procs map[int]ProcMemoryEntry
}

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 ProcMemoryEntry added in v1.45.1

type ProcMemoryEntry struct {
	Name   string
	Memory int
}

type ProcStats added in v1.30.0

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

Directories

Path Synopsis
Package maxprocs caps GOMAXPROCS to the Kubernetes CPU request so the Go scheduler doesn't create more OS threads than the pod is guaranteed.
Package maxprocs caps GOMAXPROCS to the Kubernetes CPU request so the Go scheduler doesn't create more OS threads than the pod is guaranteed.

Jump to

Keyboard shortcuts

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