Skip to content

benchmark crud: suppress compact warnings during benchmark runs, fixes #9365 #9366

Merged
ThomasWaldmann merged 1 commit intoborgbackup:masterfrom
mr-raj12:fix-benchmark-compact-warnings
Feb 17, 2026
Merged

benchmark crud: suppress compact warnings during benchmark runs, fixes #9365 #9366
ThomasWaldmann merged 1 commit intoborgbackup:masterfrom
mr-raj12:fix-benchmark-compact-warnings

Conversation

@mr-raj12
Copy link
Contributor

Summary

  • Suppress repeated Done. Run "borg compact" to free space. warnings that clutter borg benchmark crud output
  • measurement_run() calls do_delete() 3 times per test sample, each emitting the warning — 18 extra lines with the default 6 samples
  • For --json-lines mode, non-JSON warnings contaminate the JSON stream
  • Fix: temporarily raise the borg.archiver logger level to ERROR during measurement runs, restoring it afterward via try/finally
  • Single-file change in benchmark_cmd.py, no interface changes

Closes #9365

Checklist

  • PR is against master
  • Tests pass
  • Locally verified: pytest benchmark_cmd_test.py (4/4 passed) and borg benchmark crud --json-lines produces clean JSON-only output

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.44%. Comparing base (1150b8d) to head (c7261ae).
⚠️ Report is 12 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9366      +/-   ##
==========================================
- Coverage   76.44%   76.44%   -0.01%     
==========================================
  Files          85       85              
  Lines       14792    14806      +14     
  Branches     2211     2213       +2     
==========================================
+ Hits        11308    11318      +10     
- Misses       2807     2810       +3     
- Partials      677      678       +1     

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

Copy link
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@ThomasWaldmann ThomasWaldmann merged commit 3f6282c into borgbackup:master Feb 17, 2026
19 checks passed
@ThomasWaldmann
Copy link
Member

Can you please check whether we have the same issue in 1.4-maint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

benchmark crud: suppress "borg compact" warnings during benchmark runs

2 participants