mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-05 11:21:09 +03:00
Count number of packets sent and lost by type
Summary: We currently have a count of the number of packets retransmitted, and the number of packets marked as lost spuriously, but we do *not* have the total number of packets sent or lost, which is necessary to calculate statistics such as % of packets retransmitted % of losses that are spurious. At the moment, we do not count loss events for D6D packets. Will likely add a separate counter for those in a subsequent diff. Reviewed By: xttjsn Differential Revision: D25540531 fbshipit-source-id: 80db729eb8c91f7805d342f4aab302a5b3ca4347
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f8dde62725
commit
68d660c46d
@@ -2129,6 +2129,15 @@ TEST_F(QuicTransportFunctionsTest, TotalBytesSentUpdate) {
|
||||
EXPECT_EQ(5555, conn->lossState.totalBytesSent);
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TotalPacketsSentUpdate) {
|
||||
const auto startTotalPacketsSent = 1234;
|
||||
auto conn = createConn();
|
||||
conn->lossState.totalPacketsSent = startTotalPacketsSent;
|
||||
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::Handshake);
|
||||
updateConnection(*conn, folly::none, packet.packet, TimePoint{}, 4321);
|
||||
EXPECT_EQ(startTotalPacketsSent + 1, conn->lossState.totalPacketsSent);
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportFunctionsTest, TimeoutBasedRetxCountUpdate) {
|
||||
auto conn = createConn();
|
||||
auto stream = conn->streamManager->createNextBidirectionalStream().value();
|
||||
|
Reference in New Issue
Block a user