mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-07-30 14:43:05 +03:00
Add number of pings frames sent on conn
Reviewed By: hanidamlaj Differential Revision: D63334030 fbshipit-source-id: c3cf2eb365b254e626e4331699aec09b436f6beb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d9a995bf56
commit
188e44ac19
@ -787,6 +787,7 @@ void updateConnection(
|
|||||||
if (conn.transportSettings.ptoPingFrames) {
|
if (conn.transportSettings.ptoPingFrames) {
|
||||||
retransmittable = true;
|
retransmittable = true;
|
||||||
}
|
}
|
||||||
|
conn.numPingFramesSent++;
|
||||||
break;
|
break;
|
||||||
case QuicWriteFrame::Type::QuicSimpleFrame: {
|
case QuicWriteFrame::Type::QuicSimpleFrame: {
|
||||||
const QuicSimpleFrame& simpleFrame = *frame.asQuicSimpleFrame();
|
const QuicSimpleFrame& simpleFrame = *frame.asQuicSimpleFrame();
|
||||||
|
@ -1762,6 +1762,21 @@ TEST_F(QuicTransportFunctionsTest, StreamDetailsNoStreamsInPacket) {
|
|||||||
EXPECT_THAT(detailsPerStream, IsEmpty());
|
EXPECT_THAT(detailsPerStream, IsEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(QuicTransportFunctionsTest, TestPingFrameCounter) {
|
||||||
|
auto conn = createConn();
|
||||||
|
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::AppData);
|
||||||
|
packet.packet.frames.push_back(PingFrame());
|
||||||
|
updateConnection(
|
||||||
|
*conn,
|
||||||
|
none,
|
||||||
|
packet.packet,
|
||||||
|
TimePoint(),
|
||||||
|
getEncodedSize(packet),
|
||||||
|
getEncodedBodySize(packet),
|
||||||
|
false /* isDSRPacket */);
|
||||||
|
ASSERT_EQ(1, conn->numPingFramesSent);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(QuicTransportFunctionsTest, StreamDetailsSingleStream) {
|
TEST_F(QuicTransportFunctionsTest, StreamDetailsSingleStream) {
|
||||||
uint64_t frameOffset = 0;
|
uint64_t frameOffset = 0;
|
||||||
uint64_t frameLen = 10;
|
uint64_t frameLen = 10;
|
||||||
|
@ -1877,4 +1877,8 @@ uint64_t QuicClientTransport::getNumFlowControlFramesSent() const {
|
|||||||
return conn_->numWindowUpdateFramesSent;
|
return conn_->numWindowUpdateFramesSent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t QuicClientTransport::getNumPingFramesSent() const {
|
||||||
|
return conn_->numPingFramesSent;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace quic
|
} // namespace quic
|
||||||
|
@ -220,6 +220,8 @@ class QuicClientTransport
|
|||||||
|
|
||||||
uint64_t getNumFlowControlFramesSent() const;
|
uint64_t getNumFlowControlFramesSent() const;
|
||||||
|
|
||||||
|
uint64_t getNumPingFramesSent() const;
|
||||||
|
|
||||||
class HappyEyeballsConnAttemptDelayTimeout : public QuicTimerCallback {
|
class HappyEyeballsConnAttemptDelayTimeout : public QuicTimerCallback {
|
||||||
public:
|
public:
|
||||||
explicit HappyEyeballsConnAttemptDelayTimeout(
|
explicit HappyEyeballsConnAttemptDelayTimeout(
|
||||||
|
@ -499,6 +499,8 @@ struct QuicConnectionStateBase : public folly::DelayedDestruction {
|
|||||||
// connection wide).
|
// connection wide).
|
||||||
uint64_t numWindowUpdateFramesSent{0};
|
uint64_t numWindowUpdateFramesSent{0};
|
||||||
|
|
||||||
|
uint64_t numPingFramesSent{0};
|
||||||
|
|
||||||
struct ConnectionFlowControlState {
|
struct ConnectionFlowControlState {
|
||||||
// The size of the connection flow control window.
|
// The size of the connection flow control window.
|
||||||
uint64_t windowSize{0};
|
uint64_t windowSize{0};
|
||||||
|
Reference in New Issue
Block a user