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

Function contextSavings

scripts/context-compression-benchmark.mjs:188–196  ·  view source on GitHub ↗
(byMode)

Source from the content-addressed store, hash-verified

186}
187
188function contextSavings(byMode) {
189 const chars = byMode.off.avgContextChars - byMode.beta.avgContextChars;
190 const approxTokens = byMode.off.avgContextApproxTokens - byMode.beta.avgContextApproxTokens;
191 return {
192 chars: round(chars),
193 approxTokens: round(approxTokens),
194 percent: round(safeRatio(chars, byMode.off.avgContextChars) * 100),
195 };
196}
197
198export async function runBenchmark(options = {}) {
199 const config = {

Callers 1

summarizeBenchmarkFunction · 0.85

Calls 2

roundFunction · 0.90
safeRatioFunction · 0.90

Tested by

no test coverage detected