Skip to main content

Module stats

Module stats 

Source
Expand description

Database statistics and health overview.

Provides a quick summary of whatโ€™s indexed: document counts, chunk counts, embedding coverage, and per-source breakdowns. Used by ctx stats to give confidence that syncs and embeddings are working as expected.

Functionsยง

format_bytes ๐Ÿ”’
Format a byte count as a human-readable string.
format_ts_iso ๐Ÿ”’
format_ts_relative ๐Ÿ”’
Format a Unix timestamp as a relative time string (e.g. โ€œ3 hours agoโ€).
run_stats
Run the stats command: query the database and print a summary.