gw,pdcp,rlc,mac: log rate metrics in debug mode

reduce periodic log spam for L2 in info level
master
Andre Puschmann 3 years ago
parent d65ae322d3
commit 26f3f6109b

@ -362,12 +362,12 @@ void pdcp::get_metrics(pdcp_metrics_t& m, const uint32_t nof_tti)
double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
logger.info("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)", logger.debug("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)",
it->first, it->first,
rx_rate_mbps, rx_rate_mbps,
rx_rate_mbps_real_time, rx_rate_mbps_real_time,
tx_rate_mbps, tx_rate_mbps,
tx_rate_mbps_real_time); tx_rate_mbps_real_time);
m.bearer[it->first] = metrics; m.bearer[it->first] = metrics;
} }

@ -99,21 +99,21 @@ void rlc::get_metrics(rlc_metrics_t& m, const uint32_t nof_tti)
double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; double rx_rate_mbps = (nof_tti > 0) ? ((metrics.num_rx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; double tx_rate_mbps = (nof_tti > 0) ? ((metrics.num_tx_pdu_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
logger.info("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)", logger.debug("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)",
it->first, it->first,
rx_rate_mbps, rx_rate_mbps,
rx_rate_mbps_real_time, rx_rate_mbps_real_time,
tx_rate_mbps, tx_rate_mbps,
tx_rate_mbps_real_time); tx_rate_mbps_real_time);
m.bearer[it->first] = metrics; m.bearer[it->first] = metrics;
} }
// Add multicast metrics // Add multicast metrics
for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) { for (rlc_map_t::iterator it = rlc_array_mrb.begin(); it != rlc_array_mrb.end(); ++it) {
rlc_bearer_metrics_t metrics = it->second->get_metrics(); rlc_bearer_metrics_t metrics = it->second->get_metrics();
logger.info("MCH_LCID=%d, rx_rate_mbps=%4.2f", logger.debug("MCH_LCID=%d, rx_rate_mbps=%4.2f",
it->first, it->first,
(metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs.count()); (metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs.count());
m.bearer[it->first] = metrics; m.bearer[it->first] = metrics;
} }

@ -668,11 +668,11 @@ void mac::get_metrics(mac_metrics_t m[SRSRAN_MAX_CARRIERS])
dl_avg_ret /= dl_avg_ret_count; dl_avg_ret /= dl_avg_ret_count;
} }
Info("DL retx: %.2f \%%, perpkt: %.2f, UL retx: %.2f \%% perpkt: %.2f", Debug("DL retx: %.2f \%%, perpkt: %.2f, UL retx: %.2f \%% perpkt: %.2f",
rx_pkts ? ((float)100 * rx_errors / rx_pkts) : 0.0f, rx_pkts ? ((float)100 * rx_errors / rx_pkts) : 0.0f,
dl_avg_ret, dl_avg_ret,
tx_pkts ? ((float)100 * tx_errors / tx_pkts) : 0.0f, tx_pkts ? ((float)100 * tx_errors / tx_pkts) : 0.0f,
ul_harq.at(PCELL_CC_IDX)->get_average_retx()); ul_harq.at(PCELL_CC_IDX)->get_average_retx());
metrics[PCELL_CC_IDX].ul_buffer = (int)bsr_procedure.get_buffer_state(); metrics[PCELL_CC_IDX].ul_buffer = (int)bsr_procedure.get_buffer_state();
memcpy(m, metrics, sizeof(mac_metrics_t) * SRSRAN_MAX_CARRIERS); memcpy(m, metrics, sizeof(mac_metrics_t) * SRSRAN_MAX_CARRIERS);

@ -109,11 +109,11 @@ void gw::get_metrics(gw_metrics_t& m, const uint32_t nof_tti)
m.dl_tput_mbps = (nof_tti > 0) ? ((dl_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; m.dl_tput_mbps = (nof_tti > 0) ? ((dl_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
m.ul_tput_mbps = (nof_tti > 0) ? ((ul_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0; m.ul_tput_mbps = (nof_tti > 0) ? ((ul_tput_bytes * 8 / (double)1e6) / (nof_tti / 1000.0)) : 0.0;
logger.info("gw_rx_rate_mbps=%4.2f (real=%4.2f), gw_tx_rate_mbps=%4.2f (real=%4.2f)", logger.debug("gw_rx_rate_mbps=%4.2f (real=%4.2f), gw_tx_rate_mbps=%4.2f (real=%4.2f)",
m.dl_tput_mbps, m.dl_tput_mbps,
dl_tput_mbps_real_time, dl_tput_mbps_real_time,
m.ul_tput_mbps, m.ul_tput_mbps,
ul_tput_mbps_real_time); ul_tput_mbps_real_time);
// reset counters and store time // reset counters and store time
metrics_tp = std::chrono::high_resolution_clock::now(); metrics_tp = std::chrono::high_resolution_clock::now();

Loading…
Cancel
Save