setup_cgroups

Function setup_cgroups 

Source
pub fn setup_cgroups<'a>(
    ctx: &'a Ctx<'_>,
    n: usize,
    wl: &WorkloadConfig,
) -> Result<(Vec<WorkloadHandle>, CgroupGroup<'a>)>
Expand description

Create N cgroups, spawn workers in each, and start them.

Returns the worker handles and an RAII CgroupGroup that removes the cgroups on drop. Workers are moved into their target cgroups before being signaled to start.