MCPcopy Create free account
hub / github.com/cloudflare/computer / sample

Function sample

script/computerd-stub-soak.mjs:226–233  ·  view source on GitHub ↗
(session, label)

Source from the content-addressed store, hash-verified

224
225 const phases = []; // { label, sessionStats, targets }
226 async function sample(session, label) {
227 const sessionStats = session.getStats();
228 const targets = await targetSnapshot(port);
229 phases.push({ label, sessionStats, targets });
230 console.error(
231 `[soak] ${label.padEnd(22)} imports=${sessionStats.imports} exports=${sessionStats.exports} targets=${JSON.stringify(targets)}`,
232 );
233 }
234
235 try {
236 await waitForHealth(port, child);

Callers 1

mainFunction · 0.70

Calls 3

targetSnapshotFunction · 0.85
pushMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected