Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Waldmann a13b5d1b79
benchmark: fix return value, fixes #8113 2024-02-21 13:20:55 +01:00
Thomas Waldmann a0a07ab464
use get_reset_ec to internally re-init ec/warnings
if we do multiple calls to Archiver.do_something(),
we need to reset the ec / warnings after each call,
otherwise they will keep growing (in severity, in length).
2024-02-17 22:37:44 +01:00
Thomas Waldmann abe6545853
do not return the rc from Archiver methods
this is not needed and getting rid of it makes
the code / behaviour simpler to understand:

if a fatal error is detected, we throw an exception.

if we encounter something warning worthy, we emit and collect the warning.

in a few cases, we directly call set_ec to set the
exit code as needed, e.g. if passing it through
from a subprocess.

also:
- get rid of Archiver.exit_code
- assert that return value of archiver methods is None
- fix a print_warning call to use the correct formatting method
2024-02-17 22:07:47 +01:00
Thomas Waldmann 420eae6138
benchmark cpu: use sanitized path, fixes #7654 2023-06-22 21:22:18 +02:00
Thomas Waldmann 08a2db9410
benchmark crud: use TemporaryDirectory below given path, fixes #4706 2023-04-07 18:05:19 +02:00
Thomas Waldmann a0330d578e
run black 23.1.0 on the code 2023-02-01 12:30:37 +01:00
Thomas Waldmann bf3f9b5e5b benchmark: fixed TypeError in compression benchmarks 2022-10-05 22:11:44 +02:00
Thomas Waldmann 66e74e0471 archiver modules: rename to *_cmd[s]
this was already required for list_cmd (due to "list"
being a builtin), now renamed all else also.
2022-08-13 22:59:48 +02:00
Renamed from src/borg/archiver/benchmarks.py (Browse further)