feat: add memory footprint to /stats and dashboard #26

Merged
razvandimescu merged 3 commits from feat/memory-footprint into main 2026-04-01 14:09:44 +08:00
razvandimescu commented 2026-03-30 07:05:28 +08:00 (Migrated from github.com)

Summary

  • Add heap_bytes() estimation to all stores (cache, blocklist, query log, SRTT, overrides) with per-record/per-packet heap tracking
  • Add cross-platform process RSS reading (mach_task_basic_info on macOS, sysconf+/proc/self/statm on Linux)
  • Include memory object in /api/stats response with per-component byte counts, total estimated, and process RSS
  • Add 6th stat card (Memory) to dashboard top row showing process RSS headline
  • Add sidebar panel with stacked color bar and component breakdown list

Test plan

  • make all passes (fmt, clippy, audit, build, 111 tests)
  • Start Numa, open dashboard, verify Memory stat card shows RSS
  • Verify sidebar Memory panel shows breakdown with colored bar
  • Curl /stats and confirm memory object in JSON response
  • Test responsive layout at 900px and 700px breakpoints

🤖 Generated with Claude Code

## Summary - Add `heap_bytes()` estimation to all stores (cache, blocklist, query log, SRTT, overrides) with per-record/per-packet heap tracking - Add cross-platform process RSS reading (`mach_task_basic_info` on macOS, `sysconf`+`/proc/self/statm` on Linux) - Include `memory` object in `/api/stats` response with per-component byte counts, total estimated, and process RSS - Add 6th stat card (Memory) to dashboard top row showing process RSS headline - Add sidebar panel with stacked color bar and component breakdown list ## Test plan - [x] `make all` passes (fmt, clippy, audit, build, 111 tests) - [ ] Start Numa, open dashboard, verify Memory stat card shows RSS - [ ] Verify sidebar Memory panel shows breakdown with colored bar - [ ] Curl `/stats` and confirm `memory` object in JSON response - [ ] Test responsive layout at 900px and 700px breakpoints 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.