From e829c967195260afe705d2b937fa2df5ce403699 Mon Sep 17 00:00:00 2001 From: michele papalini Date: Fri, 18 Oct 2019 13:20:17 +0200 Subject: [HICN-338] correctly compute the estimated production rate in rtc socket Signed-off-by: michele papalini Change-Id: I5ab36c5dde449ff0f3e0372372c09dbb227aecf5 --- libtransport/src/hicn/transport/protocols/rtc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libtransport/src/hicn/transport/protocols/rtc.cc') diff --git a/libtransport/src/hicn/transport/protocols/rtc.cc b/libtransport/src/hicn/transport/protocols/rtc.cc index ba8f549c3..db36473cb 100644 --- a/libtransport/src/hicn/transport/protocols/rtc.cc +++ b/libtransport/src/hicn/transport/protocols/rtc.cc @@ -803,6 +803,9 @@ void RTCTransportProtocol::onContentObject( avgPacketSize_ = (HICN_ESTIMATED_PACKET_SIZE * avgPacketSize_) + ((1 - HICN_ESTIMATED_PACKET_SIZE) * payload->length()); + receivedBytes_ += (uint32_t)(content_object->headerSize() + + content_object->payloadSize()); + if (inflightInterests_[pkt].state == sent_) { inflightInterestsCount_--; // packet sent without timeouts } @@ -810,10 +813,7 @@ void RTCTransportProtocol::onContentObject( if (inflightInterests_[pkt].state == sent_ && interestRetransmissions_.find(segmentNumber) == interestRetransmissions_.end()) { - // we count only non retransmitted data in order to take into accunt only - // the transmition rate of the producer - receivedBytes_ += (uint32_t)(content_object->headerSize() + - content_object->payloadSize()); + // delay stats are computed only for non retransmitted data updateDelayStats(*content_object); } -- cgit 1.2.3-korg