MCPcopy Create free account
hub / github.com/avoidwork/tenso / checkRateWithOverride

Function checkRateWithOverride

benchmarks/rate-limiting.js:351–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349 };
350
351 const checkRateWithOverride = req => {
352 let state = {
353 limit: 100,
354 remaining: 50,
355 reset: Date.now() + 900000
356 };
357
358 // Apply override
359 state = overrideFunction(req, state);
360
361 return state.remaining > 0;
362 };
363
364 suite
365 .add("Rate Override - Normal user", () => {

Callers 1

benchmarkRateOverrideFunction · 0.85

Calls 1

overrideFunctionFunction · 0.85

Tested by

no test coverage detected