]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-top: Handle `METRIC_TYPE_NONE` fields for sorting 50195/head
authorNeeraj Pratap Singh <Neeraj.Pratap.Singh1@ibm.com>
Tue, 21 Feb 2023 10:10:13 +0000 (15:40 +0530)
committerNeeraj Pratap Singh <Neeraj.Pratap.Singh1@ibm.com>
Tue, 28 Feb 2023 04:28:09 +0000 (09:58 +0530)
Currently, the sort feature in cephfs-top isn't applicable
to the fields which are of type `METRIC_TYPE_NONE` , named as
'ofiles', 'oicaps' and 'oinodes'. This commit will make the
cephfs-top sort feature to support the above mentioned fields too.
From this commit onwards, all the current fields displayed in
cephfs-top can be used for sorting.

Fixes: https://tracker.ceph.com/issues/58814
Signed-off-by: Neeraj Pratap Singh <neesingh@redhat.com>
src/tools/cephfs/top/cephfs-top

index 5461b9d759531866dced62a3fa4a3b527df8b2fe..79c57a31cf6049d15071484821473dcda39b2c0b 100755 (executable)
@@ -824,6 +824,7 @@ class FSTop(FSTopBase):
                     xp += len(f'{self.speed_items(item)}{self.speed_mtype(typ)}') + ITEMS_PAD_LEN
                 else:
                     # display 0th element from metric tuple
+                    metrics_dict[fs_name][client_id][self.items(item)] = m[0]
                     self.fsstats.addstr(y_coord, xp, f'{m[0]}', curses.A_DIM)
                     xp += len(f'{self.items(item)}{self.mtype(typ)}') + ITEMS_PAD_LEN
             else: