telemetry: drop unused getCPUStats, unblocking darwin builds without cgo (#4841)

getCPUStats has no callers: node CPU load comes from hwstats.CPUStats in
GetNodeStats, and nothing in the tree reads getCPUStats. Only getLoadAvg
is still used.

Remove the function from both the windows and non-windows variants along
with the state it kept. getLoadAvg is untouched, and go-osstat stays a
direct dependency through it.

Co-authored-by: XiaoShao <26596822+xiaoshao9704@users.noreply.github.com>
This commit is contained in:
XiaoShao
2026-09-07 20:24:29 -07:00
committed by GitHub
co-authored by XiaoShao
parent e18fbcc0fa
commit a3a760bb48
2 changed files with 1 additions and 36 deletions
-4
View File
@@ -23,7 +23,3 @@ import "github.com/mackerelio/go-osstat/loadavg"
func getLoadAvg() (*loadavg.Stats, error) {
return &loadavg.Stats{}, nil
}
func getCPUStats() (cpuLoad float32, numCPUs uint32, err error) {
return 1, 1, nil
}