mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 06:47:26 +00: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 serialRuns = keepGatewaySerial ? runs.filter((entry) => entry.name === "gateway") : [];
|
||||||
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
const localWorkers = Math.max(4, Math.min(16, os.cpus().length));
|
||||||
const defaultUnitWorkers = localWorkers;
|
const defaultUnitWorkers = localWorkers;
|
||||||
const defaultExtensionsWorkers = Math.max(1, Math.min(4, Math.floor(localWorkers / 4)));
|
// Local perf: extensions tend to be the critical path under parallel vitest runs; give them more headroom.
|
||||||
const defaultGatewayWorkers = Math.max(1, Math.min(4, localWorkers));
|
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.
|
// 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.
|
// In CI on linux/windows, prefer Vitest defaults to avoid cross-test interference from lower worker counts.
|
||||||
|
|||||||
Reference in New Issue
Block a user