(label: string, reports: ReadonlyArray<ClientReport>)
| 199 | ); |
| 200 | |
| 201 | const summarize = (label: string, reports: ReadonlyArray<ClientReport>): void => { |
| 202 | const ok = reports.filter((r) => r.ok).length; |
| 203 | const calls = reports.reduce((n, r) => n + r.results.length, 0); |
| 204 | const failures = reports.filter((r) => !r.ok).map((r) => `#${r.id}: ${r.error}`); |
| 205 | // eslint-disable-next-line no-console |
| 206 | console.log( |
| 207 | `[stress:${label}] clients ${ok}/${reports.length} ok, ${calls} execute calls` + |
| 208 | (failures.length ? `\n failures:\n ${failures.join("\n ")}` : ""), |
| 209 | ); |
| 210 | }; |
| 211 | |
| 212 | const CONCURRENCY = Number(process.env.E2E_MCP_STRESS_CLIENTS ?? "10"); |
| 213 | const CALLS = Number(process.env.E2E_MCP_STRESS_CALLS ?? "5"); |
no test coverage detected