cleaned stdout metric

master
Ismael Gomez 7 years ago
parent 582c87e86d
commit b353ed03dd

@ -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;

@ -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;

Loading…
Cancel
Save