Expand description
SessionDb lifecycle: create, open (with strict schema-version check), save-to, prune, session groups, raw-file paths.
Structs§
- Create
Options - Parameters for
SessionDb::create. - Session
Db - An open SessionDb — either in-memory (fresh) or backed by a file.
Enums§
- Prune
Policy - Whether
prunedeletes only auto-created sessions or everything over age.
Functions§
- auto_
label "{basename}-{yyyymmdd-hhmmss}"in the local-ish (system time) zone, computed fromSystemTime::now()without pulling in chrono.- compute_
target_ hash - Cheap target fingerprint:
"<size>:<mtime_ns>". Good enough to detect “target has been rebuilt since last session”. Not a cryptographic hash. - group_
key - Deterministic session-group id derived from
(cwd, target_hash). Two sessions share a group iff they were launched against the same target from the same working directory. - prune
- Walk
sessions_dir, delete.dbfiles for auto sessions whose mtime is older thanolder_than. Returns the list of deleted paths. User-promoted sessions are never touched underPrunePolicy::AutoOnly. - raw_dir
<cwd>/.dbg/sessions/<label>/raw/— where raw captures (perf.data,nsys-rep,.nettrace, etc.) are preserved verbatim. Per principle 5 (adaptation layer), these files are the durable artifact.- sessions_
dir <cwd>/.dbg/sessions/— where saved session DBs live.