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

Sampler: count sample times before the grouped row count #16716

Merged opened this

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

Merged

Every 5 minutes the sampler's capRows counted all 15-second rows by source (1.07 M rows) to trim sources over the cap: 0.6–1.8 s on the serving thread each time, about 14 s per hour.

Notes

opened this

Every 5 minutes the sampler's capRows counted all 15-second rows by source (1.07 M rows) to trim sources over the cap: 0.6–1.8 s on the serving thread each time, about 14 s per hour.

A source has at most one row per sample time, so it now counts distinct sample times first (20 ms) and runs the grouped count only when there are more than the cap.

test/boards-sampler-cap-instants.test.ts fails without the fix. tsc and gate clean.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs