From c4ba24c3059bff4bb7a9c86d2b6afa0a0688ee7e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 10 Mar 2021 01:05:17 +0300 Subject: [PATCH] Do not print ping op latency --- src/osd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd.cpp b/src/osd.cpp index 14a2a8a2..5a178bbe 100644 --- a/src/osd.cpp +++ b/src/osd.cpp @@ -261,9 +261,9 @@ void osd_t::reset_stats() void osd_t::print_stats() { - for (int i = 0; i <= OSD_OP_MAX; i++) + for (int i = OSD_OP_MIN; i <= OSD_OP_MAX; i++) { - if (c_cli.stats.op_stat_count[i] != prev_stats.op_stat_count[i]) + if (c_cli.stats.op_stat_count[i] != prev_stats.op_stat_count[i] && i != OSD_OP_PING) { uint64_t avg = (c_cli.stats.op_stat_sum[i] - prev_stats.op_stat_sum[i])/(c_cli.stats.op_stat_count[i] - prev_stats.op_stat_count[i]); uint64_t bw = (c_cli.stats.op_stat_bytes[i] - prev_stats.op_stat_bytes[i]) / print_stats_interval; @@ -284,7 +284,7 @@ void osd_t::print_stats() prev_stats.op_stat_bytes[i] = c_cli.stats.op_stat_bytes[i]; } } - for (int i = 0; i <= OSD_OP_MAX; i++) + for (int i = OSD_OP_MIN; i <= OSD_OP_MAX; i++) { if (c_cli.stats.subop_stat_count[i] != prev_stats.subop_stat_count[i]) {