benchmark crud: suppress compact warnings during benchmark runs, fixes #9365 #9366
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
|
Can you please check whether we have the same issue in 1.4-maint? |
|
Checked 1.4-maint, this issue doesn't exist there. On 1.4-maint, _delete_archives() only emits a warning ("Run borg check --repair") in the forced==2 path. The standard delete path (which benchmark crud uses, since it doesn't pass --force) has no such warning at all. Also, 1.4-maint doesn't have --json-lines for benchmark crud, so the JSON contamination angle doesn't apply either. |
Summary
Done. Run "borg compact" to free space.warnings that clutterborg benchmark crudoutputmeasurement_run()callsdo_delete()3 times per test sample, each emitting the warning — 18 extra lines with the default 6 samples--json-linesmode, non-JSON warnings contaminate the JSON streamborg.archiverlogger level to ERROR during measurement runs, restoring it afterward via try/finallybenchmark_cmd.py, no interface changesCloses #9365
Checklist
masterpytest benchmark_cmd_test.py(4/4 passed) andborg benchmark crud --json-linesproduces clean JSON-only output