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

analyze: changed chunks per directory #8436

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ThomasWaldmann
Copy link
Member

@ThomasWaldmann ThomasWaldmann commented Sep 29, 2024

Fixes #71.

  • relies on the usual archive selection via -a pattern to select archives that belong together / that should be considered for analysis.
  • goes over all selected archives, over all contained files and collects informations about chunks stored in all directories it encountered.
  • considers chunk IDs and their plaintext sizes (we don't have the compressed size in the repo easily available).
  • adds up added/removed chunks' sizes per direct parent directory (not per filename, that would consume lots of memory and also maybe is not really necessary).
  • outputs a list of "directory: size" in reverse order by size.

Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 4 lines in your changes missing coverage. Please review.

Project coverage is 81.63%. Comparing base (2e37b1a) to head (7533f23).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/borg/archiver/analyze_cmd.py 95.12% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8436      +/-   ##
==========================================
+ Coverage   81.52%   81.63%   +0.10%     
==========================================
  Files          70       71       +1     
  Lines       12797    12883      +86     
  Branches     2325     2336      +11     
==========================================
+ Hits        10433    10517      +84     
  Misses       1705     1705              
- Partials      659      661       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann ThomasWaldmann force-pushed the analyze-cmd branch 2 times, most recently from a044c99 to 6a314ed Compare September 29, 2024 16:14
@ThomasWaldmann
Copy link
Member Author

Hmm, unsure about counting added AND removed chunks:

  • it might be a good score for the activity inside a directory
  • otoh, people are usually rather interested in what's eating their repo space and for that, only added chunks are interesting.

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.

"Analyze" function to find (and remove) missed non-dedupable temp/cache hotspots
1 participant