[Core] Stop using removed disk.num_blocks_cache_hits stat

Removed in libtorrent v2.0.0:
569d47c391
This commit is contained in:
iczero 2021-07-30 23:23:49 -07:00 committed by Calum Lind
parent a5a7da4a1a
commit 89189adb24
2 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View File

@ -22,3 +22,5 @@ deluge/ui/web/js/extjs/ext-extensions*.js
osx/app
RELEASE-VERSION
.venv*
# used by setuptools to cache downloaded eggs
/.eggs

View File

@ -358,8 +358,8 @@ class Core(component.Component):
if blocks_read:
self.session_status['read_hit_ratio'] = (
self.session_status['disk.num_blocks_cache_hits'] / blocks_read
)
blocks_read - self.session_status['disk.num_read_ops']
) / blocks_read
else:
self.session_status['read_hit_ratio'] = 0.0