mirror of https://github.com/PentHertz/srsLTE.git
rlc_metrics: add sdu rx latency and buffered bytes
This commit is contained in:
parent
2e64fff1df
commit
d54c33258b
|
@ -25,7 +25,7 @@ typedef struct {
|
||||||
uint64_t num_tx_sdu_bytes;
|
uint64_t num_tx_sdu_bytes;
|
||||||
uint64_t num_rx_sdu_bytes;
|
uint64_t num_rx_sdu_bytes;
|
||||||
uint32_t num_lost_sdus; //< Count dropped SDUs at Tx due to bearer inactivity or empty buffer
|
uint32_t num_lost_sdus; //< Count dropped SDUs at Tx due to bearer inactivity or empty buffer
|
||||||
uint64_t sdu_tx_latency_us;
|
uint64_t rx_latency_ms; //< Average time in ms from first RLC segment to full SDU
|
||||||
|
|
||||||
// PDU metrics
|
// PDU metrics
|
||||||
uint32_t num_tx_pdus;
|
uint32_t num_tx_pdus;
|
||||||
|
@ -33,6 +33,9 @@ typedef struct {
|
||||||
uint64_t num_tx_pdu_bytes;
|
uint64_t num_tx_pdu_bytes;
|
||||||
uint64_t num_rx_pdu_bytes;
|
uint64_t num_rx_pdu_bytes;
|
||||||
uint32_t num_lost_pdus; //< Lost PDUs registered at Rx
|
uint32_t num_lost_pdus; //< Lost PDUs registered at Rx
|
||||||
|
|
||||||
|
// misc metrics
|
||||||
|
uint32_t rx_buffered_bytes; //< sum of payload of PDUs buffered in rx_window
|
||||||
} rlc_bearer_metrics_t;
|
} rlc_bearer_metrics_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -837,17 +837,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
|
||||||
tx_sdu->N_bytes -= to_move;
|
tx_sdu->N_bytes -= to_move;
|
||||||
tx_sdu->msg += to_move;
|
tx_sdu->msg += to_move;
|
||||||
if (tx_sdu->N_bytes == 0) {
|
if (tx_sdu->N_bytes == 0) {
|
||||||
#ifdef ENABLE_TIMESTAMP
|
log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME);
|
||||||
long latency_us = tx_sdu->get_latency_us().count();
|
|
||||||
mean_pdu_latency_us.push(latency_us);
|
|
||||||
parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value();
|
|
||||||
log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n",
|
|
||||||
RB_NAME,
|
|
||||||
latency_us,
|
|
||||||
(long)parent->metrics.sdu_tx_latency_us);
|
|
||||||
#else
|
|
||||||
log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str());
|
|
||||||
#endif
|
|
||||||
tx_sdu.reset();
|
tx_sdu.reset();
|
||||||
}
|
}
|
||||||
if (pdu_space > to_move) {
|
if (pdu_space > to_move) {
|
||||||
|
@ -886,17 +876,7 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
|
||||||
tx_sdu->N_bytes -= to_move;
|
tx_sdu->N_bytes -= to_move;
|
||||||
tx_sdu->msg += to_move;
|
tx_sdu->msg += to_move;
|
||||||
if (tx_sdu->N_bytes == 0) {
|
if (tx_sdu->N_bytes == 0) {
|
||||||
#ifdef ENABLE_TIMESTAMP
|
log->debug("%s Complete SDU scheduled for tx.\n", RB_NAME);
|
||||||
long latency_us = tx_sdu->get_latency_us().count();
|
|
||||||
mean_pdu_latency_us.push(latency_us);
|
|
||||||
parent->metrics.sdu_tx_latency_us = mean_pdu_latency_us.value();
|
|
||||||
log->debug("%s Complete SDU scheduled for tx. Stack latency (last/average): %ld/%ld us\n",
|
|
||||||
RB_NAME,
|
|
||||||
latency_us,
|
|
||||||
(long)parent->metrics.sdu_tx_latency_us);
|
|
||||||
#else
|
|
||||||
log->debug("%s Complete SDU scheduled for tx.\n", rb_name.c_str());
|
|
||||||
#endif
|
|
||||||
tx_sdu.reset();
|
tx_sdu.reset();
|
||||||
}
|
}
|
||||||
if (pdu_space > to_move) {
|
if (pdu_space > to_move) {
|
||||||
|
|
Loading…
Reference in New Issue