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

The test budget is CPU time: a test starved on a loaded box is not red, one that spends its seconds is #17310

opened this

Merged 32h 7m ago, live in production

The runner's per-test (2 s) and per-file (20 s) budget read wall time, and on 12-01 it made 46 of the 59 wall-clock reds: under load, wall time measures the machine, not the test.

Notes

opened this

The runner's per-test (2 s) and per-file (20 s) budget read wall time, and on 12-01 it made 46 of the 59 wall-clock reds: under load, wall time measures the machine, not the test. Now each bun test the runner starts preloads scripts/test-cpu.ts, which writes each test's CPU seconds (user + system, from just before it to just after it, keyed by pid so a bun test a test starts stays out); withCpu lays them onto the JUnit cases in the order they ran, keeping the wall seconds beside them (counts that differ leave the wall seconds). A file alone is judged by the child's own CPU (resourceUsage, its reaped children included). Same limits, in CPU seconds. Wall time stays a backstop for a hang at five budgets (10 s a test, 100 s a file); its (fail) line says so with the CPU it spent. The retime alone (#12848) judges by the same measure.

Direction: CI speed: chase the false reds first; the check's own budget was the biggest source on 12-01 No door: the check runner's own judgment; its (fail) lines say CPU time or the hang backstop in the pull's check log Try: a test that awaits for 3 s passes the 2 s budget; one that spins for 3 s fails it, its line saying of CPU

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs