/** * Command CLI generation */ /** * Constructs a systemd-run command array. * @param unit The systemd unit to run. * @param workingDirectory The working directory for the systemd-run command. * Defaults to the current working directory. * @returns An array representing the systemd-run command. */ export function systemdRun(unit: string, workingDirectory: string = process.cwd()): string[] { return [ 'systemd-run', '--user', `--working-directory=${workingDirectory}`, '--unit', unit ]; } export function runcpu(workload: string = 'test'): string[] { return [ "runcpu", "-c", "clang-O2", "-i", workload, "pop2_s", "--action", "run", "--nobuild", ]; }