1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-06 22:22:38 +03:00

Adding packet rtt sampling to instrumentationObserver (#178)

Summary:
Due to high number of RTT samples I refactored the OutstandingPacket to
split the packet data and packet metrics. We know have access to metrics
without the need of saving the packet data.

Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/178

Reviewed By: mjoras

Differential Revision: D23711641

Pulled By: bschlinker

fbshipit-source-id: 53791f1f6f6e184f37afca991a873af05909fbd2
This commit is contained in:
vaz985
2020-09-22 18:37:25 -07:00
committed by Facebook GitHub Bot
parent 7076092dd9
commit a8d5c156a1
34 changed files with 451 additions and 202 deletions

View File

@@ -40,7 +40,7 @@ PacketNum addInitialOutstandingPacket(QuicConnectionStateBase& conn) {
nextPacketNum,
QuicVersion::QUIC_DRAFT);
RegularQuicWritePacket packet(std::move(header));
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, true, 0);
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, true, 0, 0);
conn.outstandings.handshakePacketsCount++;
increaseNextPacketNum(conn, PacketNumberSpace::Handshake);
return nextPacketNum;
@@ -58,7 +58,7 @@ PacketNum addHandshakeOutstandingPacket(QuicConnectionStateBase& conn) {
nextPacketNum,
QuicVersion::QUIC_DRAFT);
RegularQuicWritePacket packet(std::move(header));
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, true, 0);
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, true, 0, 0);
conn.outstandings.handshakePacketsCount++;
increaseNextPacketNum(conn, PacketNumberSpace::Handshake);
return nextPacketNum;
@@ -71,7 +71,7 @@ PacketNum addOutstandingPacket(QuicConnectionStateBase& conn) {
conn.clientConnectionId.value_or(quic::test::getTestConnectionId()),
nextPacketNum);
RegularQuicWritePacket packet(std::move(header));
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, false, 0);
conn.outstandings.packets.emplace_back(packet, Clock::now(), 0, false, 0, 0);
increaseNextPacketNum(conn, PacketNumberSpace::AppData);
return nextPacketNum;
}
@@ -1371,7 +1371,8 @@ TEST_F(
conn.outstandings.packets.back().packet.frames.push_back(
MaxDataFrame(conn.flowControlState.advertisedMaxOffset));
// Lie about the encodedSize to let the Cloner skip it:
conn.outstandings.packets.back().encodedSize = kDefaultUDPSendPacketLen * 2;
conn.outstandings.packets.back().metadata.encodedSize =
kDefaultUDPSendPacketLen * 2;
EXPECT_TRUE(cloningScheduler.hasData());
ASSERT_FALSE(noopScheduler.hasData());