Skip to content

Commit

Permalink
cache: add log msg to _load_chunks_from_repo
Browse files Browse the repository at this point in the history
For big repos, this might take a while, so at least have messages on debug level.
  • Loading branch information
ThomasWaldmann committed Aug 19, 2024
1 parent 8fbcfe4 commit a655fb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/borg/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ def add_chunk(
return ChunkListEntry(id, size)

def _load_chunks_from_repo(self):
logger.debug("Cache: querying the chunk IDs list from the repo...")
chunks = ChunkIndex()
t0 = perf_counter()
num_requests = 0
Expand All @@ -651,7 +652,7 @@ def _load_chunks_from_repo(self):
del chunks[self.manifest.MANIFEST_ID]
duration = perf_counter() - t0 or 0.01
logger.debug(
"Cache: downloaded %d chunk IDs in %.2f s (%d requests), ~%s/s",
"Cache: queried %d chunk IDs in %.2f s (%d requests), ~%s/s",
num_chunks,
duration,
num_requests,
Expand Down

0 comments on commit a655fb8

Please sign in to comment.