Add approximate heap/memory tracker for ingested logs (ticket 011)

Tracks a running total of ingested log bytes (approximated as each
log's raw UTF-8 text length), incremented on ingest and decremented
in evict_excess_logs when a log is dropped. Exposed via StatsDto's
new approx_bytes_total field on GET /api/stats, and displayed in
NavMenu's stats panel formatted with toLocaleString() (comma
separators).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
Hugh Kaznowski
2026-09-05 18:38:08 +01:00
co-authored by Claude Sonnet 5
parent b1e509efbd
commit 0834c246d6
4 changed files with 73 additions and 17 deletions
+2
View File
@@ -39,6 +39,8 @@ export interface Stats {
last_sequence: number | null
first_timestamp_ms: number | null
last_timestamp_ms: number | null
/** Ticket 011: running approximate byte size of all currently-ingested logs. */
approx_bytes_total: number
}
export type ParamRole = 'label' | 'value'