Scripted multi-client harness against a real server (~110 scenario tests, server-control, managed-websocket, test-runner). Wires the new package into frontend/package.json workspaces and the lint script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17 lines
457 B
TypeScript
17 lines
457 B
TypeScript
import * as os from "node:os";
|
|
|
|
export function parseConcurrency(): number {
|
|
const args = process.argv.slice(2);
|
|
for (let i = 0; i < args.length; i++) {
|
|
if (
|
|
(args[i] === "--concurrency" || args[i] === "-j") &&
|
|
i + 1 < args.length
|
|
) {
|
|
const n = parseInt(args[i + 1], 10);
|
|
if (!isNaN(n) && n > 0) {
|
|
return n;
|
|
}
|
|
}
|
|
}
|
|
return os.cpus().length;
|
|
}
|