mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-09-26 23:19:11 +08:00

- move types pkg into runner - add documentations for cgroup & container - add benchmakr for cgroup & container
17 lines
353 B
Go
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)
|
|
}
|