Skip to main content

compute_stats

Function compute_stats 

Source
pub fn compute_stats(store: &SessionStore) -> Result<RecStats>
Expand description

Compute aggregate statistics across all sessions.

Uses load_header_and_footer() for efficient scanning — skips full command deserialization. Collects:

  • Session count
  • Total commands and duration (from footer)
  • Storage size (from file metadata)
  • Tag frequency counts (top 10)

§Errors

Returns an error if the session list cannot be read.