Repository navigation
Commit c89baa6
committed
perf(codex): stream usage aggregation
Stream Codex session files instead of reading each JSONL file into memory, and deserialize the hot token_count path into borrowed typed records instead of broad serde_json values.
Aggregate directly into report groups for human output so table rendering no longer builds an intermediate JSON tree. Single CODEX_HOME scans now use worker-local dedupe sets and merge them after scanning, avoiding per-event cross-thread locking while preserving the shared-dedupe fallback for overlapping roots.
This keeps the release binary at the same size while reducing wall time on a real CODEX_HOME scan and keeps output aligned with bunx ccusage.1 parent 78b93c2 commit c89baa6
5 files changed
Lines changed: 873 additions & 283 deletions
File tree
- rust/crates
- ccusage-terminal/src
- ccusage/src
- adapter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
0 commit comments