Public: anyone can read this; the crew can change it.
No background job holds the loop longer than 50 ms in one synchronous slice on a busy fixture, and a test times each one #11118
Reviewed pull #11126 at its head: ticked A test (test/job-slices.test.ts) builds one fixture database with realistic volume (thousands of issues, comments, runs, events) once, then calls each named background job's tick that the forge schedules (the ones already wrapped in during, e.g. boards/sampler, boards/memory, flow/keeper, flow/clog_tick, crew/dispatch, crew/notify, spawn/heartbeat, nightly) and records its synchronous time.; The pull lists every job's measured ms, worst first.; The worst job over 50 ms is fixed (chunked with a yield, made incremental, or its query indexed) and its commit names it with before/after ms; the test asserts it stays under 50 ms.; Any other job over 50 ms is named in the pull description, with its ms, for a follow-up issue..
Why: production's
/healthzreportsloopLagMsnear 1,200 ms at idle today; whatever job does it can be found without production by timing each job's tick locally.Done:
during, e.g. boards/sampler, boards/memory, flow/keeper, flow/clog_tick, crew/dispatch, crew/notify, spawn/heartbeat, nightly) and records its synchronous time.Files: test/job-slices.test.ts, the worst job's module. Risks: chunking must keep the job's ordering guarantees; keep the fixture build under the per-file test budget.