MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / summarize

Function summarize

e2e/local/cli-mcp-daemon-attach-stress.test.ts:201–210  ·  view source on GitHub ↗
(label: string, reports: ReadonlyArray<ClientReport>)

Source from the content-addressed store, hash-verified

199);
200
201const 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
212const CONCURRENCY = Number(process.env.E2E_MCP_STRESS_CLIENTS ?? "10");
213const CALLS = Number(process.env.E2E_MCP_STRESS_CALLS ?? "5");

Calls 1

logMethod · 0.80

Tested by

no test coverage detected