MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / row

Function row

scripts/agent-eval/parse-run.mjs:366–370  ·  view source on GitHub ↗
(label, tok, chars, results)

Source from the content-addressed store, hash-verified

364 const pctWin = (t) => ((t / o.windowTokens) * 100).toFixed(1);
365 const rows = [];
366 const row = (label, tok, chars, results) => rows.push(
367 `${indent} ${label.padEnd(18)}${(n(tok) + ' tok').padStart(12)} ${(pctCtx(tok) + '%').padStart(6)} of ctx ` +
368 `${(pctWin(tok) + '%').padStart(6)} of ${Math.round(o.windowTokens / 1000)}k win` +
369 (chars !== undefined ? ` (${n(chars)} chars, ${results} result${results === 1 ? '' : 's'})` : '')
370 );
371 const out = [`${indent}Residual context occupancy at end of run:`];
372 out.push(`${indent} ${'final context'.padEnd(18)}${(n(o.ctxFinal) + ' tok').padStart(12)} ${(pctWin(o.ctxFinal) + '%').padStart(6)} of ${Math.round(o.windowTokens / 1000)}k window`);
373 row('codegraph', o.residual.codegraph, o.chars.codegraph, o.results.codegraph);

Callers 1

formatOccupancyFunction · 0.70

Calls 3

nFunction · 0.85
pctCtxFunction · 0.85
pctWinFunction · 0.85

Tested by

no test coverage detected