mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-09 13:53:09 +00:00
chunks index: show hashtable stats at debug log level, fixes #506
This commit is contained in:
parent
1f00d29d19
commit
1ec66edeff
2 changed files with 6 additions and 0 deletions
|
@ -867,6 +867,8 @@ class AdHocWithFilesCache(FilesCacheMixin, ChunksMixin):
|
|||
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")
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue