Whamcloud - gitweb
LU-16993 kfilnd: Add count value to debugfs stats 85/51785/2
authorRon Gredvig <ron.gredvig@hpe.com>
Fri, 12 May 2023 19:44:48 +0000 (19:44 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Aug 2023 06:41:42 +0000 (06:41 +0000)
The debugfs stats for initialor and target include
min. max and average. It is hard to interprest the
average without knowing how many sample were included
to calculate it.

Added the count value for extra context.

Test-Parameters: trivial
HPE-bug-id: LUS-11627
Signed-off-by: Ron Gredvig <ron.gredvig@hpe.com>
Change-Id: I3d840c250653b4f29b40c169254b9c9b4c88f584
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51785
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/kfilnd/kfilnd_debugfs.c

index 43f6525..206fe5c 100644 (file)
@@ -147,15 +147,16 @@ static void seq_print_tn_stats(struct seq_file *s, struct kfilnd_dev *dev,
        else
                stats = &dev->target_stats;
 
-       seq_printf(s, "%16s %16s %16s %16s\n", "MSG_SIZE", "MIN", "MAX",
-                  "AVE");
+       seq_printf(s, "%16s %16s %16s %16s %16s\n", "MSG_SIZE", "MIN", "MAX",
+                  "AVE", "COUNT");
 
        for (data_size = 0; data_size < KFILND_DATA_SIZE_BUCKETS; data_size++) {
-               seq_printf(s, "%16lu %16llu %16llu %16llu\n",
+               seq_printf(s, "%16lu %16llu %16llu %16llu %16d\n",
                           data_size == 0 ? 0 : BIT(data_size - 1),
                           get_min_duration(&stats->data_size[data_size]),
                           atomic64_read(&stats->data_size[data_size].max_duration),
-                          get_ave_duration(&stats->data_size[data_size]));
+                          get_ave_duration(&stats->data_size[data_size]),
+                          atomic_read(&stats->data_size[data_size].accumulated_count));
        }
 }