rustic icon indicating copy to clipboard operation
rustic copied to clipboard

feat(interactive): show total diff when computing summary

Open aawsome opened this issue 1 month ago • 2 comments

aawsome avatar Dec 04 '25 23:12 aawsome

I have tried and it works great. Already have learnt a few things about my repos.

These are very useful metrics I was always missing but thought that it is too hard to get.

To have a full picture would it be possible to include uncompressed data stats as well? Effectively the same as now but uncompressed sizes.

total RepoSize     48.4 GiB  54.1 GiB
exclusive RepoSize 16.3 GiB  22.0 GiB 
shared RepoSize 32.1 GiB  32.1 GiB

total DataSize     100.4 GiB  120.1 GiB
exclusive DataSize 60.3 GiB  80.0 GiB 
shared DataSize 40.1 GiB  40.1 GiB

Having both would be perfection.

kapitainsky avatar Dec 06 '25 05:12 kapitainsky

To have a full picture would it be possible to include uncompressed data stats as well? Effectively the same as now but uncompressed sizes.

In fact it is not that easy - or not as easy as I think you are meaning it ;-)

Can you exactly define how "exclusive DataSize" and "shared DataSize" can be computed?

The point is, deduplication can already happen considering either only the left or only the right side. And then for me it is not clear how these Sizes should be defined - or if "exclusive DataSize" + "shared DataSize" can be equal to the "restore size" (which is currently displayed as "total Size").

To give an example: if the left side is a single 1MiB file containing only zeros and the right side is a single 100MiB file containing only zeros, then the left side are 2 identical blobs of 512kiB zeros and the right side are 200 identical blobs of 515kiB zeros. In the repo, only a single compressed blob is saved which has just a few bytes in size - which is the shared RepoSize; and there is 0 byte exlusive RepoSize on both sides. What would be "shared DataSize" in this example? 0 bytes? 512kiB? 1MiB? I think one could find arguments for all 3 values...

aawsome avatar Dec 06 '25 21:12 aawsome

@kapitainsky I added a few more statistics. The output now looks like this: grafik

aawsome avatar Dec 13 '25 20:12 aawsome

I'll add this output to the ls view (of course only showing the current tree and no diff stats) and the snapshots view (with the possibility to get statistics about multiple snapshots), but I'll do this in a future PR ;-)

aawsome avatar Dec 13 '25 20:12 aawsome