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

Function summarize

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

Source from the content-addressed store, hash-verified

214);
215
216const summarize = (label: string, reports: ReadonlyArray<ClientReport>): void => {
217 const ok = reports.filter((r) => r.ok).length;
218 const calls = reports.reduce((n, r) => n + r.results.length, 0);
219 const failures = reports.filter((r) => !r.ok).map((r) => `#${r.id}: ${r.error}`);
220 // eslint-disable-next-line no-console
221 console.log(
222 `[stress:${label}] clients ${ok}/${reports.length} ok, ${calls} execute calls` +
223 (failures.length ? `\n failures:\n ${failures.join("\n ")}` : ""),
224 );
225};
226
227const CONCURRENCY = Number(process.env.E2E_MCP_STRESS_CLIENTS ?? "10");
228const CALLS = Number(process.env.E2E_MCP_STRESS_CALLS ?? "5");

Calls 1

logMethod · 0.80

Tested by

no test coverage detected