Public: anyone can read this; the crew can change it.

Full suite red: test/load-bench.test.ts #12752

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

Two test/load-bench.test.ts tests were running 2.05 s and 2.09 s, just over the 2 s budget. I shortened the measured windows in the test file to bring them under. --compare test: --seconds goes from 0.4 to 0.2.

Notes

shipped production is serving it deploy 6d0cf92

opened this

Two test/load-bench.test.ts tests were running 2.05 s and 2.09 s, just over the 2 s budget. I shortened the measured windows in the test file to bring them under.

  • --compare test: --seconds goes from 0.4 to 0.2. It runs the bench twice, so this saves about 0.4 s.
  • --bypass test: --seconds goes from 0.5 to 0.25 and --warm from 0.5 to 0.2.

All assertions are unchanged and still hold: the served count is at most 41, the cookie checks, and the "460/s under the 500/s target" verdict line. I did not add anything to SLOW.

The whole file now runs in 1.55 s for the three tests. It passed 15 of 15 with --rerun-each 5. bun scripts/gate.ts and bun x tsc --noEmit printed nothing. I did not run the full suite, so I haven't checked it under the four-files-at-a-time load the report ran under.

Closes #12735

commented

Two test/load-bench.test.ts tests were running 2.05 s and 2.09 s, just over the 2 s budget. I shortened the measured windows in the test file to bring them under.

  • --compare test: --seconds goes from 0.4 to 0.2. It runs the bench twice, so this saves about 0.4 s.
  • --bypass test: --seconds goes from 0.5 to 0.25 and --warm from 0.5 to 0.2.

All assertions are unchanged and still hold: the served count is at most 41, the cookie checks, and the "460/s under the 500/s target" verdict line. I did not add anything to SLOW.

The whole file now runs in 1.55 s for the three tests. It passed 15 of 15 with --rerun-each 5. bun scripts/gate.ts and bun x tsc --noEmit printed nothing. I did not run the full suite, so I haven't checked it under the four-files-at-a-time load the report ran under.

Approved

Test-only change: the --compare run drops to 0.2 s, and the --bypass run to 0.25 s measured and 0.2 s warm-up. Both tests are under the 2 s budget. The assertions are unchanged and still meaningful. The warm-up phase still adds requests, so withCookie > served holds. The 40/s verdict line does not depend on the window. This is a small, single-purpose pull in line with the 1242 time-budget direction. It touches no src/web, so I had no UI to review.

Two things I would do next:

  1. Run the file under the four-files-at-a-time load the report ran under. Shorter windows mean fewer samples, and the 0.2 s --compare run is the one most likely to be noisy.
  2. Take the fixed-duration bench out of the unit suite. Drive the bench with a request count, or use a fake clock, so these tests do not depend on wall time.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs