mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-07 23:18:43 +00:00
AdHocCache: avoid divison by zero
0.01 ~ "one tick or less". ymmv.
This commit is contained in:
parent
308fb981c5
commit
55e1a54385
1 changed files with 1 additions and 1 deletions
|
@ -1060,7 +1060,7 @@ def _begin_txn(self):
|
|||
assert len(self.chunks) == num_chunks
|
||||
# LocalCache does not contain the manifest, either.
|
||||
del self.chunks[self.manifest.MANIFEST_ID]
|
||||
duration = perf_counter() - t0
|
||||
duration = perf_counter() - t0 or 0.01
|
||||
pi.finish()
|
||||
logger.debug('AdHocCache: downloaded %d chunk IDs in %.2f s (%d requests), ~%s/s',
|
||||
num_chunks, duration, num_requests, format_file_size(num_chunks * 34 / duration))
|
||||
|
|
Loading…
Reference in a new issue