From 8d7a336beed1daf42e8da01cd58c2a155ecb7b70 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 30 Apr 2020 18:53:43 +0200 Subject: [PATCH] enb: fix ok/nok packets fix ok/nok counter, since we do not count the correctly decoded packets explicitly, we need to calculate them from the total number of pkts minus the failed pkts to avoid this: ------DL--------------------------------UL------------------------------------ rnti cqi ri mcs brate ok nok (%) snr phr mcs brate ok nok (%) bsr 46 6.2 0 0.0 0 0 0 0% 0.11 0.00.10 0 900 900 100% 15.3k 46 7.9 0 0.0 504 1 0 0% 0.11 0.00.10 0 900 900 100% 15.3k --- srsenb/src/metrics_stdout.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srsenb/src/metrics_stdout.cc b/srsenb/src/metrics_stdout.cc index b46ec1d90..677807d3c 100644 --- a/srsenb/src/metrics_stdout.cc +++ b/srsenb/src/metrics_stdout.cc @@ -118,7 +118,7 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe } else { cout << float_to_string(0, 1, 6) << ""; } - cout << std::setw(5) << metrics.stack.mac[i].tx_pkts; + cout << std::setw(5) << metrics.stack.mac[i].tx_pkts - metrics.stack.mac[i].tx_errors; cout << std::setw(5) << metrics.stack.mac[i].tx_errors; if (metrics.stack.mac[i].tx_pkts > 0 && metrics.stack.mac[i].tx_errors) { cout << float_to_string( @@ -147,7 +147,7 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe } else { cout << float_to_string(0, 1) << ""; } - cout << std::setw(5) << metrics.stack.mac[i].rx_pkts; + cout << std::setw(5) << metrics.stack.mac[i].rx_pkts - metrics.stack.mac[i].rx_errors; cout << std::setw(5) << metrics.stack.mac[i].rx_errors; if (metrics.stack.mac[i].rx_pkts > 0 && metrics.stack.mac[i].rx_errors > 0) {