mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-09-26 23:19:11 +08:00
runner: add procPeak as measurement of peak process count
This commit is contained in:
parent
cf936ae31f
commit
51b53cf60b
@ -426,6 +426,9 @@ func start() (*runner.Result, error) {
|
|||||||
if memory > 0 {
|
if memory > 0 {
|
||||||
rt.Memory = runner.Size(memory)
|
rt.Memory = runner.Size(memory)
|
||||||
}
|
}
|
||||||
|
if procPeak > 0 {
|
||||||
|
rt.ProcPeak = procPeak
|
||||||
|
}
|
||||||
debug("cgroup:", rt)
|
debug("cgroup:", rt)
|
||||||
}
|
}
|
||||||
return &rt, nil
|
return &rt, nil
|
||||||
|
@ -11,8 +11,9 @@ type Result struct {
|
|||||||
ExitStatus int // exit status (signal number if signalled)
|
ExitStatus int // exit status (signal number if signalled)
|
||||||
Error string // potential detailed error message (for program runner error)
|
Error string // potential detailed error message (for program runner error)
|
||||||
|
|
||||||
Time time.Duration // used user CPU time (underlying type int64 in ns)
|
Time time.Duration // used user CPU time (underlying type int64 in ns)
|
||||||
Memory Size // used user memory (underlying type uint64 in bytes)
|
Memory Size // used user memory (underlying type uint64 in bytes)
|
||||||
|
ProcPeak uint64 // maximum processes
|
||||||
|
|
||||||
// metrics for the program runner
|
// metrics for the program runner
|
||||||
SetUpTime time.Duration
|
SetUpTime time.Duration
|
||||||
|
Loading…
Reference in New Issue
Block a user