diff --git a/srsenb/src/metrics_stdout.cc b/srsenb/src/metrics_stdout.cc index 6c294b96d..ec55b0dcf 100644 --- a/srsenb/src/metrics_stdout.cc +++ b/srsenb/src/metrics_stdout.cc @@ -130,9 +130,9 @@ void metrics_stdout::print_metrics() cout << float_to_string(0, 2); } if (metrics.mac[i].tx_pkts > 0 && metrics.mac[i].tx_errors) { - cout << float_to_string((float) 100*metrics.mac[i].tx_errors/metrics.mac[i].tx_pkts, 2) << "%"; + cout << float_to_string((float) 100*metrics.mac[i].tx_errors/metrics.mac[i].tx_pkts, 1) << "%"; } else { - cout << float_to_string(0, 2) << "%"; + cout << float_to_string(0, 1) << "%"; } cout << float_to_string(metrics.phy[i].ul.sinr, 2); cout << float_to_string(metrics.mac[i].phr, 2); @@ -143,9 +143,9 @@ void metrics_stdout::print_metrics() cout << float_to_string(0, 2); } if (metrics.mac[i].rx_pkts > 0 && metrics.mac[i].rx_errors > 0) { - cout << float_to_string((float) 100*metrics.mac[i].rx_errors/metrics.mac[i].rx_pkts, 2) << "%"; + cout << float_to_string((float) 100*metrics.mac[i].rx_errors/metrics.mac[i].rx_pkts, 1) << "%"; } else { - cout << float_to_string(0, 2) << "%"; + cout << float_to_string(0, 1) << "%"; } cout << float_to_eng_string(metrics.mac[i].ul_buffer, 2); cout << endl; diff --git a/srsue/src/metrics_stdout.cc b/srsue/src/metrics_stdout.cc index 6828c912f..048532c8f 100644 --- a/srsue/src/metrics_stdout.cc +++ b/srsue/src/metrics_stdout.cc @@ -92,7 +92,7 @@ void metrics_stdout::set_metrics(ue_metrics_t &metrics, float metrics_report_per if (metrics.mac.rx_pkts > 0) { cout << float_to_string((float) 100*metrics.mac.rx_errors/metrics.mac.rx_pkts, 1) << "%"; } else { - cout << float_to_string(0, 2) << "%"; + cout << float_to_string(0, 1) << "%"; } cout << float_to_string(metrics.phy.ul.mcs, 2); cout << float_to_eng_string((float) metrics.mac.ul_buffer, 2); @@ -100,7 +100,7 @@ void metrics_stdout::set_metrics(ue_metrics_t &metrics, float metrics_report_per if (metrics.mac.tx_pkts > 0) { cout << float_to_string((float) 100*metrics.mac.tx_errors/metrics.mac.tx_pkts, 1) << "%"; } else { - cout << float_to_string(0, 2) << "%"; + cout << float_to_string(0, 1) << "%"; } cout << endl;