status-go/vendor/github.com/ethereum/go-ethereum/metrics/cpu_stats.go
Andrea Maria Piana 36430257fd Upgrade geth
Point to the new fork of geth.
2021-07-20 10:57:38 +02:00

15 lines
302 B
Go

// +build !ios,!android
package metrics
import "github.com/elastic/gosigar"
func readCPUStats(stats *CPUStats) {
global := gosigar.Cpu{}
global.Get()
stats.GlobalTime = int64(global.User + global.Nice + global.Sys)
stats.GlobalWait = int64(global.Wait)
stats.LocalTime = getProcessCPUTime()
}