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

/system and the system MCP tool show the database's ten largest tables and indexes, its file size and its growth #12010

shipped production is serving it opened this has it

Landed in pull #12025 · run

opened this

Part of #11973: the forge knows its own size, so bloat is never found by a profiler again.

Done when:

commented

Reviewed pull #12025 at its head: ticked A new src/system/db_size.ts returns plain data: file bytes, the ten largest tables and the ten largest indexes by bytes (dbstat where Bun's SQLite has it, else page counts per b-tree), row counts for the tables, and growth per day from a small daily reading it keeps (one migration, last 60 days).; /system shows it as one compact table; the system MCP tool gains a kind: "size" (no new tool; bun test test/mcp-size.test.ts passes, ceilings unchanged).; A vitals need fires when the file passes 2 GiB (Bun's mmap cap) or grows faster than a constant per day.; A test over a seeded database checks the order and the need; bun scripts/design-lint.ts and bun x tsc --noEmit pass; screenshot of /system at 1280 px in the pull..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs