From 54674576dba2c5efd945c1e8f5accd2d8ca2afcd Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 26 Sep 2021 10:46:19 +0100 Subject: [UI] Remove num_blocks_cache_hits usage for stats Removed in libtorrent v2: https://github.com/arvidn/libtorrent/commit/569d4 --- deluge/ui/common.py | 1 - .../console/modes/preferences/preference_panes.py | 5 --- deluge/ui/gtk3/glade/preferences_dialog.ui | 36 +++++----------------- deluge/ui/gtk3/preferences.py | 1 - 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/deluge/ui/common.py b/deluge/ui/common.py index 9af1d50bd..c5064a6f4 100644 --- a/deluge/ui/common.py +++ b/deluge/ui/common.py @@ -160,7 +160,6 @@ DISK_CACHE_KEYS = [ 'disk.num_blocks_written', 'disk.num_read_ops', 'disk.num_write_ops', - 'disk.num_blocks_cache_hits', 'read_hit_ratio', 'write_hit_ratio', 'disk.disk_blocks_in_use', diff --git a/deluge/ui/console/modes/preferences/preference_panes.py b/deluge/ui/console/modes/preferences/preference_panes.py index 62029a6a9..8663d8a9c 100644 --- a/deluge/ui/console/modes/preferences/preference_panes.py +++ b/deluge/ui/console/modes/preferences/preference_panes.py @@ -724,11 +724,6 @@ class CachePane(BasePreferencePane): self.add_info_field( 'blocks_read', ' %s:' % _('Blocks Read'), status['disk.num_blocks_read'] ) - self.add_info_field( - 'blocks_read_hit', - ' %s:' % _('Blocks Read hit'), - status['disk.num_blocks_cache_hits'], - ) self.add_info_field('reads', ' %s:' % _('Reads'), status['disk.num_read_ops']) self.add_info_field( 'read_hit_ratio', diff --git a/deluge/ui/gtk3/glade/preferences_dialog.ui b/deluge/ui/gtk3/glade/preferences_dialog.ui index 11eda3296..4cfceddcf 100644 --- a/deluge/ui/gtk3/glade/preferences_dialog.ui +++ b/deluge/ui/gtk3/glade/preferences_dialog.ui @@ -1,5 +1,5 @@ - + @@ -245,7 +245,7 @@ dialog - + @@ -3879,29 +3879,17 @@ the proxy instead of using the local DNS service 0 - - - True - False - The number of blocks that were served from cache. - start - Blocks Read Hit: - - - 0 - 1 - - True False The cache hit ratio for the read cache. + start Read Cache Hit Ratio: 0 - 3 + 2 @@ -3914,16 +3902,6 @@ the proxy instead of using the local DNS service 0 - - - True - False - - - 1 - 1 - - True @@ -3931,7 +3909,7 @@ the proxy instead of using the local DNS service 1 - 3 + 2 @@ -3945,7 +3923,7 @@ the proxy instead of using the local DNS service 0 - 2 + 1 @@ -3955,7 +3933,7 @@ the proxy instead of using the local DNS service 1 - 2 + 1 diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index 5650ad8df..ec4b3265a 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -957,7 +957,6 @@ class Preferences(component.Component): 'label_cache_num_blocks_written', 'label_cache_read_hit_ratio', 'label_cache_write_hit_ratio', - 'label_cache_num_blocks_cache_hits', 'label_cache_disk_blocks_in_use', 'label_cache_read_cache_blocks', ) -- cgit