Involved Source Files Package cgrouptest provides best-effort helpers for running tests inside a
cgroup.
Package-Level Type Names (only one)
/* sort by: | */
Path to cpu.max.(*CgroupV2) Path() string Set cpu.max. Pass -1 for quota to disable the limit.
Package-Level Functions (only one)
InCgroupV2 creates a new v2 cgroup, migrates the current process into it,
and then calls fn. When fn returns, the current process is migrated back to
the original cgroup and the new cgroup is destroyed.
If a new cgroup cannot be created, the test is skipped.
This must not be used in parallel tests, as it affects the entire process.
The pages are generated with Goldsv0.7.7-preview. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.