diff --git a/lib/include/srslte/upper/rlc_metrics.h b/lib/include/srslte/upper/rlc_metrics.h index ab6e83c02..153fba57b 100644 --- a/lib/include/srslte/upper/rlc_metrics.h +++ b/lib/include/srslte/upper/rlc_metrics.h @@ -27,13 +27,15 @@ #ifndef SRSLTE_RLC_METRICS_H #define SRSLTE_RLC_METRICS_H +#include "srslte/common/common.h" namespace srslte { struct rlc_metrics_t { - float dl_tput_mbps; - float ul_tput_mbps; + float dl_tput_mbps[SRSLTE_N_RADIO_BEARERS]; + float ul_tput_mbps[SRSLTE_N_RADIO_BEARERS]; + float dl_tput_mrb_mbps[SRSLTE_N_MCH_LCIDS]; }; } // namespace srslte diff --git a/lib/src/upper/rlc.cc b/lib/src/upper/rlc.cc index c24f0076b..fdc1d4a99 100644 --- a/lib/src/upper/rlc.cc +++ b/lib/src/upper/rlc.cc @@ -90,11 +90,9 @@ void rlc::get_metrics(rlc_metrics_t &m) get_time_interval(metrics_time); double secs = (double)metrics_time[0].tv_sec + metrics_time[0].tv_usec*1e-6; - m.dl_tput_mbps = 0; - m.ul_tput_mbps = 0; for (int i=0;iinfo("LCID=%d, RX throughput: %4.6f Mbps. TX throughput: %4.6f Mbps.\n", i, @@ -105,7 +103,7 @@ void rlc::get_metrics(rlc_metrics_t &m) // Add multicast metrics for (int i=0;iinfo("MCH_LCID=%d, RX throughput: %4.6f Mbps.\n", i, diff --git a/srsue/hdr/mac/mac_metrics.h b/srsue/hdr/mac/mac_metrics.h index a201d2a7f..56d20dcdc 100644 --- a/srsue/hdr/mac/mac_metrics.h +++ b/srsue/hdr/mac/mac_metrics.h @@ -39,6 +39,8 @@ struct mac_metrics_t int rx_errors; int rx_brate; int ul_buffer; + float dl_retx_avg; + float ul_retx_avg; }; } // namespace srsue diff --git a/srsue/src/mac/mac.cc b/srsue/src/mac/mac.cc index ffa0ca1a3..8eb15e339 100644 --- a/srsue/src/mac/mac.cc +++ b/srsue/src/mac/mac.cc @@ -476,6 +476,8 @@ void mac::get_metrics(mac_metrics_t &m) ul_harq.get_average_retx()); metrics.ul_buffer = (int) bsr_procedure.get_buffer_state(); + metrics.dl_retx_avg = dl_harq.get_average_retx(); + metrics.ul_retx_avg = ul_harq.get_average_retx(); m = metrics; bzero(&metrics, sizeof(mac_metrics_t)); }