diff --git a/src/borg/cache.py b/src/borg/cache.py index b50def496..93a187270 100644 --- a/src/borg/cache.py +++ b/src/borg/cache.py @@ -867,6 +867,8 @@ def close(self): integrity_data = self._write_files_cache(self._files) self.cache_config.integrity[self.files_cache_name()] = integrity_data if self._chunks is not None: + for key, value in sorted(self._chunks.stats.items()): + logger.debug(f"Chunks index stats: {key}: {value}") pi.output("Saving chunks cache") self._write_chunks_cache(self._chunks) # cache/chunks in repo has a different integrity mechanism pi.output("Saving cache config") diff --git a/src/borg/hashindex.pyx b/src/borg/hashindex.pyx index 4b6373a38..978d923fd 100644 --- a/src/borg/hashindex.pyx +++ b/src/borg/hashindex.pyx @@ -69,6 +69,10 @@ class ChunkIndex(HTProxyMixin, MutableMapping): def size(self): return self.ht.size() + @property + def stats(self): + return self.ht.stats + FuseVersionsIndexEntry = namedtuple('FuseVersionsIndexEntry', 'version hash')