go-sandbox/runner/limit.go
criyle 4f2257a187 Remove types pkg & update documents
- move types pkg into runner
- add documentations for cgroup & container
- add benchmakr for cgroup & container
2020-03-02 03:14:13 -05:00

17 lines
353 B
Go

package runner
import (
"fmt"
"time"
)
// Limit represents the resource limit for traced process
type Limit struct {
TimeLimit time.Duration // user CPU time limit (in ns)
MemoryLimit Size // user memory limit (in bytes)
}
func (l Limit) String() string {
return fmt.Sprintf("Limit[Time=%v, Memory=%v]", l.TimeLimit, l.MemoryLimit)
}