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

reduce periodic log spam for L2 in info level
This commit is contained in:
Andre Puschmann 2022-02-03 21:10:04 +01:00
parent d65ae322d3
commit 26f3f6109b
4 changed files with 25 additions and 25 deletions

View File

@ -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 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)",
it->first,
rx_rate_mbps,
rx_rate_mbps_real_time,
tx_rate_mbps,
tx_rate_mbps_real_time);
logger.debug("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)",
it->first,
rx_rate_mbps,
rx_rate_mbps_real_time,
tx_rate_mbps,
tx_rate_mbps_real_time);
m.bearer[it->first] = metrics;
}

View File

@ -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 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)",
it->first,
rx_rate_mbps,
rx_rate_mbps_real_time,
tx_rate_mbps,
tx_rate_mbps_real_time);
logger.debug("lcid=%d, rx_rate_mbps=%4.2f (real=%4.2f), tx_rate_mbps=%4.2f (real=%4.2f)",
it->first,
rx_rate_mbps,
rx_rate_mbps_real_time,
tx_rate_mbps,
tx_rate_mbps_real_time);
m.bearer[it->first] = metrics;
}
// Add multicast metrics
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();
logger.info("MCH_LCID=%d, rx_rate_mbps=%4.2f",
it->first,
(metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs.count());
logger.debug("MCH_LCID=%d, rx_rate_mbps=%4.2f",
it->first,
(metrics.num_rx_pdu_bytes * 8 / static_cast<double>(1e6)) / secs.count());
m.bearer[it->first] = metrics;
}

View File

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

View File

@ -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.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)",
m.dl_tput_mbps,
dl_tput_mbps_real_time,
m.ul_tput_mbps,
ul_tput_mbps_real_time);
logger.debug("gw_rx_rate_mbps=%4.2f (real=%4.2f), gw_tx_rate_mbps=%4.2f (real=%4.2f)",
m.dl_tput_mbps,
dl_tput_mbps_real_time,
m.ul_tput_mbps,
ul_tput_mbps_real_time);
// reset counters and store time
metrics_tp = std::chrono::high_resolution_clock::now();