MCPcopy
hub / github.com/rpamis/comet / summarizeBenchmark

Function summarizeBenchmark

scripts/context-compression-benchmark.mjs:102–121  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

100export { parseCodexJsonl, toBashPath };
101
102export function summarizeBenchmark(results) {
103 const modes = summarizeModes(results);
104 const tiers = {};
105 for (const tier of [...new Set(results.map((result) => result.tier).filter(Boolean))]) {
106 const tierResults = results.filter((result) => result.tier === tier);
107 const tierModes = summarizeModes(tierResults);
108 tiers[tier] = {
109 modes: tierModes,
110 tokenSavings: savings(tierModes, 'avgTotalTokens', 'avgInputTokens'),
111 contextSavings: contextSavings(tierModes),
112 };
113 }
114
115 return {
116 modes,
117 tiers,
118 tokenSavings: savings(modes, 'avgTotalTokens', 'avgInputTokens'),
119 contextSavings: contextSavings(modes),
120 };
121}
122
123function summarizeModes(results) {
124 const byMode = {};

Callers 2

runBenchmarkFunction · 0.85

Calls 3

summarizeModesFunction · 0.85
savingsFunction · 0.85
contextSavingsFunction · 0.85

Tested by

no test coverage detected