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
master
Andre Puschmann 5 years ago
parent b69b274c63
commit 8d7a336bee

@ -118,7 +118,7 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe
} else { } else {
cout << float_to_string(0, 1, 6) << ""; 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; cout << std::setw(5) << metrics.stack.mac[i].tx_errors;
if (metrics.stack.mac[i].tx_pkts > 0 && metrics.stack.mac[i].tx_errors) { if (metrics.stack.mac[i].tx_pkts > 0 && metrics.stack.mac[i].tx_errors) {
cout << float_to_string( cout << float_to_string(
@ -147,7 +147,7 @@ void metrics_stdout::set_metrics(const enb_metrics_t& metrics, const uint32_t pe
} else { } else {
cout << float_to_string(0, 1) << ""; 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; 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) { if (metrics.stack.mac[i].rx_pkts > 0 && metrics.stack.mac[i].rx_errors > 0) {

Loading…
Cancel
Save