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

Function budgetFor

scripts/regression/gate.mjs:221–225  ·  view source on GitHub ↗

A budget that holds on a slower machine, kept as it is while the time stays well inside it.

(seconds, kept)

Source from the content-addressed store, hash-verified

219
220/** A budget that holds on a slower machine, kept as it is while the time stays well inside it. */
221function budgetFor(seconds, kept) {
222 const wanted = Math.max(BUDGET_FLOOR_SECONDS, Math.ceil(seconds * BUDGET_TIMES));
223 if (kept && seconds * 1.5 <= kept && wanted * 2 >= kept) return kept;
224 return wanted;
225}
226
227// ---------------------------------------------------------------------------------------------
228// Answers

Callers 1

gate.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected