Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
39
func
(u *Usage) CPUTotal() time.Duration {
40
return
time.Duration(u.Utime + u.Stime + u.Cutime + u.Cstime)
41
}
42
43
func
GetUsage() (*Usage, error) {
44
f, err := os.Open(
"/proc/self/stat"
)
Callers
1
CPUUsage
Function · 0.45
Calls
1
Duration
Method · 0.80
Tested by
no test coverage detected