package stats func cpuBusyPercentFromDeltas(idleDelta, totalDelta float64) float64 { if totalDelta <= 0 { return 0 } busyPct := (1.0 - idleDelta/totalDelta) * 100 if busyPct < 0 { return 0 } if busyPct > 100 { return 100 } return busyPct }