(byMode)
| 186 | } |
| 187 | |
| 188 | function 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 | |
| 198 | export async function runBenchmark(options = {}) { |
| 199 | const config = { |
no test coverage detected