Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: output only one value instead of a table #49

Open
Forza-tng opened this issue Mar 25, 2023 · 2 comments
Open

Feature request: output only one value instead of a table #49

Forza-tng opened this issue Mar 25, 2023 · 2 comments

Comments

@Forza-tng
Copy link

When looking at the size of subvolumes and snapshots, I usually only want to look at the actual disk usage for the chosen set.

Example:

Instead of

# compsize foo
Processed 2778793 files, 79568 regular extents (1461600 refs), 1612739 inline.
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL       45%      3.5G         7.6G          96G
none       100%      1.9G         1.9G          29G
zstd        27%      1.5G         5.7G          67G
# compsize --disk-usage foo
3.5G

Ultimately it would be nice to print a table for the chosen set, similar to what btrfs fi du -s does.

# compsize --disk-usage foo bar 
Size      Path
---------------
3.5G      foo
4.1G      bar
# compsize --summary --disk-usage foo bar 
Size      Path
---------------
3.5G      foo
4.1G      bar
---------------
7.6G      TOTAL
@kilobyte
Copy link
Owner

There's, at present, no disk usage known for individual items. Measuring it would require calculating the set of extents referenced by the current item, rather that by all items processed. Doing so is of course not hard; cost: no extra I/O, double the current memory.

Outputting a single field needs only a trivial amount of tuits; it's just that my field of them is barren these days :/

@Forza-tng
Copy link
Author

From my point of view, it would be enough to show only the apparent size of the selected set, like how compsize works today.

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

No branches or pull requests

2 participants