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

Function instrumented

packages/hosts/mcp/src/tool-server.test.ts:2089–2098  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2087// stacked. A `toJSON` probe counts full `JSON.stringify` walks of the value.
2088describe("formatMcpExecutionOutcome serialization cost", () => {
2089 const instrumented = () => {
2090 let walks = 0;
2091 const probe = {
2092 toJSON: () => {
2093 walks += 1;
2094 return "probe";
2095 },
2096 };
2097 return { value: { data: [1, 2, 3], probe }, walks: () => walks };
2098 };
2099
2100 it("stringifies the result value once for a plain completed outcome", () => {
2101 const fixture = instrumented();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected