MCPcopy Create free account
hub / github.com/cortexkit/magic-context / printSummary

Function printSummary

packages/plugin/scripts/longmemeval/runner.ts:886–899  ·  view source on GitHub ↗
(summary: RunSummary)

Source from the content-addressed store, hash-verified

884}
885
886function printSummary(summary: RunSummary): void {
887 console.log("\nLongMemEval summary");
888 console.table(
889 summary.rows.map((row) => ({
890 category: row.category,
891 correct: row.correct,
892 total: row.total,
893 accuracy: row.total === 0 ? "n/a" : `${(row.accuracy * 100).toFixed(2)}%`,
894 })),
895 );
896 console.log(`Estimated total cost: $${summary.costs.totalEstimatedUsd.toFixed(6)}`);
897 console.log(`Actual OpenCode cost: $${summary.costs.totalActualUsd.toFixed(6)}`);
898 console.log(`Total tokens: ${summary.tokens.totalTokens}`);
899}
900
901async function writeSummary(config: RunnerConfig, resultsMap: Map<string, QuestionResultRecord>, selectedCount: number): Promise<void> {
902 const orderedResults = Array.from(resultsMap.values()).sort((left, right) => left.dataset_index - right.dataset_index);

Callers 1

writeSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected