MCPcopy
hub / github.com/CodisLabs/codis / CPUTotal

Method CPUTotal

pkg/utils/usage_linux.go:39–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (u *Usage) CPUTotal() time.Duration {
40 return time.Duration(u.Utime + u.Stime + u.Cutime + u.Cstime)
41}
42
43func GetUsage() (*Usage, error) {
44 f, err := os.Open("/proc/self/stat")

Callers 1

CPUUsageFunction · 0.45

Calls 1

DurationMethod · 0.80

Tested by

no test coverage detected