-
-
Notifications
You must be signed in to change notification settings - Fork 817
Added stats to prune command #9271
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
base: 1.4-maint
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.4-maint #9271 +/- ##
=============================================
- Coverage 80.57% 80.53% -0.04%
=============================================
Files 38 38
Lines 11256 11264 +8
Branches 1771 1772 +1
=============================================
+ Hits 9070 9072 +2
- Misses 1616 1623 +7
+ Partials 570 569 -1 ☔ View full report in Codecov by Sentry. |
ThomasWaldmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, some feedback...
| if args.stats: | ||
| stats_logger = logging.getLogger('borg.output.stats') | ||
| stats_logger.info('Archive counts:') | ||
| stats_logger.info('Number of archives: %d', len(manifest.archives)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that way, the numbers are left-aligned.
guess I'ld prefer either:
- no alignment (simplest)
- right aligned
| stats_logger.info('Number of archives: %d', len(manifest.archives)) | ||
|
|
||
| if args.glob_archives: | ||
| stats_logger.info('Number of archives matching pattern: %d', len(archives_checkpoints)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe say "globbing pattern" to be more specific.
| str(cache), | ||
| DASHES, logger=logging.getLogger('borg.output.stats')) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Fixes #9262
Added a --stats argument to the prune command to display archive counts (total, kept, pruned).