checkerCount
uses node:os
How many checker processes a sync checks received definitions with at once: TCM_CHECKERS, or half the machine's
cores, up to 4 (one inside a slot another holds, inSuiteSlot: a suite's). One means none: it checks them
itself.
import { inSuiteSlot } from "#codebase/tcmts/cli/budget"; import os from "node:os"; export function checkerCount(): number { const n = Number(process.env.TCM_CHECKERS); if (Number.isInteger(n) && n >= 1) return n; if (inSuiteSlot()) return 1; return Math.max(1, Math.min(4, Math.floor(os.availableParallelism() / 2))); }