Skip to content

Add --per-snapshot flag for snapshot-level chunk usage breakdown#21

Merged
VoltKraft merged 1 commit into
VoltKraft:WIPfrom
saladpanda:feat-per-snapshot-stats
Apr 27, 2026
Merged

Add --per-snapshot flag for snapshot-level chunk usage breakdown#21
VoltKraft merged 1 commit into
VoltKraft:WIPfrom
saladpanda:feat-per-snapshot-stats

Conversation

@saladpanda

Copy link
Copy Markdown
Contributor

When running with --all-guests or a single --searchpath, the new --per-snapshot flag shows a column-aligned table below each guest summary with per-snapshot breakdowns (Unique Size / Shared Size / Total Size), newest snapshot first.

Combined with --csv-dir, an additional snapshots_*.csv file is written with per-snapshot detail.

The existing guest-level summary output is unchanged — the snapshot breakdown is extra data computed from the same analysis pass.

Sample output:

💾 Saving all used chunks [8/18 /ct/116]
📄 Index [8/18 /ct/116] 16/16 (100.00%) | ⏱ 0m 00s
➕ Summing up chunks [8/18 /ct/116]
📦 Chunk [8/18 /ct/116] 845866/845866 (100.00%) | 🧮 Size so far: 2.9TiB | ⏱ 5m 00s
🧮 Total size: 3161327475129 Bytes (2.9TiB)
⏱ Evaluation duration: 5m 00s
🧩 Chunk usage summary:
  Unique chunks    :  845866  57.36% | 2.9TiB
  Duplicate refs   :  628785  42.64% | 1.9TiB
  Total references : 1474651         | 4.8TiB

📋 Snapshot breakdown:
  Snapshot              Unique Size  Shared Size  Total Size
  --------------------  -----------  -----------  ----------
  2026-04-25T23:41:59Z       2.3GiB     114.8GiB    117.1GiB
  2026-04-24T23:44:05Z     154.5GiB     606.6GiB    761.1GiB
  2026-04-23T23:46:28Z       1.3GiB     755.2GiB    756.5GiB
  2026-04-22T23:44:31Z       1.4GiB     766.5GiB    767.9GiB
  2026-04-19T23:48:40Z     403.2GiB     315.9GiB    719.0GiB
  2026-04-12T23:50:45Z     428.6GiB     134.2GiB    562.8GiB
  2026-03-29T23:46:53Z     504.2GiB     109.5GiB    613.7GiB
  2026-02-22T00:45:08Z     525.7GiB      93.5GiB    619.3GiB

Add --per-snapshot CLI option that shows a column-aligned per-snapshot
table (Unique Size / Shared Size / Total Size) below each guest summary
when used with --all-guests or a single --searchpath.

When combined with --csv-dir, an additional CSV file (snapshots_*.csv)
is written with per-snapshot columns: namespace_path, snapshot_name,
unique_bytes, shared_bytes, total_bytes, unique_chunks.

The overall guest-level summary remains identical to the existing
implementation -- per-snapshot breakdown is computed as extra data
from the same index file analysis.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution to this project.

@VoltKraft VoltKraft changed the base branch from main to WIP April 27, 2026 18:00
@VoltKraft VoltKraft merged commit a860a69 into VoltKraft:WIP Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants