From 613d397d0a5bc21bbafc96ef789ef4c55031a887 Mon Sep 17 00:00:00 2001 From: faluco Date: Thu, 18 Feb 2021 17:30:45 +0100 Subject: [PATCH] - Dump the PDCP metrics into the JSON file. - Fix the PDCP metrics getting reset periodically which invalidated the byte counters. --- lib/src/upper/pdcp_entity_lte.cc | 3 ++- srsenb/src/metrics_json.cc | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index 92d82466d..ca6d4a510 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -693,7 +693,8 @@ pdcp_bearer_metrics_t pdcp_entity_lte::get_metrics() void pdcp_entity_lte::reset_metrics() { - metrics = {}; + // Only reset metrics that have are snapshots, leave the incremental ones untouched. + metrics.tx_notification_latency_ms = 0; } } // namespace srslte diff --git a/srsenb/src/metrics_json.cc b/srsenb/src/metrics_json.cc index 9377866f3..caeff385c 100644 --- a/srsenb/src/metrics_json.cc +++ b/srsenb/src/metrics_json.cc @@ -128,12 +128,14 @@ static void fill_ue_metrics(mset_ue_container& ue, const enb_metrics_t& m, unsig if (drb.first >= SRSLTE_N_RADIO_BEARERS) { continue; } - const auto& rlc_bearer = m.stack.rlc.ues[i].bearer; - bearer_container.write(rlc_bearer[drb.first].num_tx_sdu_bytes); - bearer_container.write(rlc_bearer[drb.first].num_rx_sdu_bytes); + const auto& rlc_bearer = m.stack.rlc.ues[i].bearer; + const auto& pdcp_bearer = m.stack.pdcp.ues[i].bearer; + bearer_container.write(pdcp_bearer[drb.first].num_tx_acked_bytes); + bearer_container.write(pdcp_bearer[drb.first].num_rx_pdu_bytes); + bearer_container.write(pdcp_bearer[drb.first].tx_notification_latency_ms / 1e3); bearer_container.write(rlc_bearer[drb.first].rx_latency_ms / 1e3); + bearer_container.write(pdcp_bearer[drb.first].num_tx_buffered_pdus_bytes); bearer_container.write(rlc_bearer[drb.first].rx_buffered_bytes); - //:TODO: fill in dl_buffered_bytes and dl_latency } }