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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user