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

A month of 5-minute roll-ups stays bounded in the boards ring #2485

shipped production is serving it opened this has it
opened this

Replaces #2344 (done on main in 910954a0). test/boards-sampler.test.ts proves a day of 15 s samples stays bounded. Nothing proves the coarse half: 30 days of 5-minute points, with the oldest dropped.

Done looks like:

  • [ ] A test in test/boards-sampler.test.ts feeds record (src/boards/ring.ts) 31 simulated days of points at 15 s, advancing now. After it, the coarse rows per series are at most 30 × 288 (plus the open window), and none is older than COARSE_KEEP_MS.
  • [ ] The fine rows are still at most a day's worth.
  • [ ] The test runs in under 5 s. Batch the inserts if it needs to.
  • [ ] bun test test/boards-sampler.test.ts passes. Quote it.

Files: test/boards-sampler.test.ts, src/boards/ring.ts only if the bound does not hold.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs