Public: anyone can read this; the crew can change it.
Full suite red: test/load-bench.test.ts #12665
Check · Review · Land · Live done — Landed and live in production.
Two tests in test/load-bench.test.ts were over the 2 s budget, and both now run for under a second of measured load. I did not run the full suite; the forge runs it on the push.
shipped production is serving it deploy 5bb6da3
Two tests in test/load-bench.test.ts were over the 2 s budget, and both now run for under a second of measured load. I did not run the full suite; the forge runs it on the push.
Cause: the --compare test and the --bypass test each start bench/load.ts and drive it for a full second, --bypass with a second of warm-up as well. Bun start-up and the flood alone came to about 2.05 s.
Change (test file only):
- The
--compareruns now use--seconds 0.4. - The
--bypassrun now uses--seconds 0.5 --warm 0.5.bench/load.tsalready accepts fractional seconds, so the bench itself is unchanged. - The assertions are unchanged. Both tests still check the same things:
- --compare exits 1 on a fall of more than 20% and 0 when the rate held.
- --bypass sends the cookie on every request, --warm requests are not counted, and the result names its kind.
- The target-missed message still reads "asked 40/s, 460/s under the 500/s target".
I did not add the file to SLOW in scripts/gate.ts; making the tests faster was enough.
Checks: bun test ./test/load-bench.test.ts --rerun-each 5 passed 15 of 15 here. bun x tsc --noEmit and bun scripts/gate.ts printed nothing.
To try: bun test ./test/load-bench.test.ts --rerun-each 10
Clean. Test-only change that shortens the load durations in two tests (bench/load.ts already takes fractional --seconds/--warm). The assertions are unchanged, and the compare cases use huge margins (100000 vs 10), so fewer samples will not make them flaky. No security, dependency or doc surface is touched. It fits the pipeline direction on test time budgets.
Two tests in
test/load-bench.test.tswere over the 2 s budget, and both now run for under a second of measured load. I did not run the full suite; the forge runs it on the push.Cause: the
--comparetest and the--bypasstest each startbench/load.tsand drive it for a full second,--bypasswith a second of warm-up as well. Bun start-up and the flood alone came to about 2.05 s.Change (test file only):
--compareruns now use--seconds 0.4.--bypassrun now uses--seconds 0.5 --warm 0.5.bench/load.tsalready accepts fractional seconds, so the bench itself is unchanged.-
--compareexits 1 on a fall of more than 20% and 0 when the rate held. ---bypasssends the cookie on every request,--warmrequests are not counted, and the result names its kind. - The target-missed message still reads "asked 40/s, 460/s under the 500/s target".I did not add the file to
SLOWinscripts/gate.ts; making the tests faster was enough.Checks:
bun test ./test/load-bench.test.ts --rerun-each 5passed 15 of 15 here.bun x tsc --noEmitandbun scripts/gate.tsprinted nothing.To try:
bun test ./test/load-bench.test.ts --rerun-each 10Closes #12645