mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
perf(test): tune parallel vitest worker split
This commit is contained in:
@@ -123,8 +123,9 @@ const parallelRuns = keepGatewaySerial ? runs.filter((entry) => entry.name !== "
|
||||
const serialRuns = keepGatewaySerial ? runs.filter((entry) => entry.name === "gateway") : [];
|
||||
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
||||
const defaultUnitWorkers = localWorkers;
|
||||
const defaultExtensionsWorkers = Math.max(1, Math.min(4, Math.floor(localWorkers / 4)));
|
||||
const defaultGatewayWorkers = Math.max(1, Math.min(4, localWorkers));
|
||||
// Local perf: extensions tend to be the critical path under parallel vitest runs; give them more headroom.
|
||||
const defaultExtensionsWorkers = Math.max(1, Math.min(6, Math.floor(localWorkers / 2)));
|
||||
const defaultGatewayWorkers = Math.max(1, Math.min(2, Math.floor(localWorkers / 4)));
|
||||
|
||||
// Keep worker counts predictable for local runs; trim macOS CI workers to avoid worker crashes/OOM.
|
||||
// In CI on linux/windows, prefer Vitest defaults to avoid cross-test interference from lower worker counts.
|
||||
|
||||
Reference in New Issue
Block a user