mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
Use finalWriteOffset for stream bytes sent
Reviewed By: JunqiWang Differential Revision: D46663584 fbshipit-source-id: 1b22eb90501a9b904c17818991d01e5a0fbf2734
This commit is contained in:
committed by
Facebook GitHub Bot
parent
99f786c58f
commit
0fd6ba7f78
@@ -261,7 +261,7 @@ class QuicSocket {
|
|||||||
|
|
||||||
// Total number of 'new' stream bytes sent on this stream.
|
// Total number of 'new' stream bytes sent on this stream.
|
||||||
// Does not include retransmissions of stream bytes.
|
// Does not include retransmissions of stream bytes.
|
||||||
uint64_t newStreamBytesSent{0};
|
folly::Optional<uint64_t> streamBytesSent{0};
|
||||||
|
|
||||||
// Total number of stream bytes received on this stream.
|
// Total number of stream bytes received on this stream.
|
||||||
folly::Optional<uint64_t> streamBytesReceived{0};
|
folly::Optional<uint64_t> streamBytesReceived{0};
|
||||||
|
@@ -3510,7 +3510,7 @@ QuicTransportBase::getStreamTransportInfo(StreamId id) const {
|
|||||||
bool(stream->lastHolbTime),
|
bool(stream->lastHolbTime),
|
||||||
packets,
|
packets,
|
||||||
stream->streamLossCount,
|
stream->streamLossCount,
|
||||||
stream->newStreamBytesSent,
|
stream->finalWriteOffset,
|
||||||
stream->finalReadOffset};
|
stream->finalReadOffset};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -675,7 +675,6 @@ void updateConnection(
|
|||||||
maybeWriteDataBlockedAfterSocketWrite(conn);
|
maybeWriteDataBlockedAfterSocketWrite(conn);
|
||||||
conn.streamManager->addTx(writeStreamFrame.streamId);
|
conn.streamManager->addTx(writeStreamFrame.streamId);
|
||||||
newStreamBytesSent += writeStreamFrame.len;
|
newStreamBytesSent += writeStreamFrame.len;
|
||||||
stream->newStreamBytesSent += writeStreamFrame.len;
|
|
||||||
}
|
}
|
||||||
conn.streamManager->updateWritableStreams(*stream);
|
conn.streamManager->updateWritableStreams(*stream);
|
||||||
streamBytesSent += writeStreamFrame.len;
|
streamBytesSent += writeStreamFrame.len;
|
||||||
|
@@ -541,9 +541,6 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketRetrans) {
|
|||||||
// total = 48
|
// total = 48
|
||||||
EXPECT_EQ(conn->lossState.totalStreamBytesSent, 48); // sum(len)
|
EXPECT_EQ(conn->lossState.totalStreamBytesSent, 48); // sum(len)
|
||||||
|
|
||||||
EXPECT_EQ(stream1->newStreamBytesSent, 12);
|
|
||||||
EXPECT_EQ(stream2->newStreamBytesSent, 12);
|
|
||||||
|
|
||||||
// totalNewStreamBytesSent: just sum(len)
|
// totalNewStreamBytesSent: just sum(len)
|
||||||
EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 24);
|
EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 24);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
@@ -734,10 +731,6 @@ TEST_F(
|
|||||||
// total = 66
|
// total = 66
|
||||||
EXPECT_EQ(conn->lossState.totalStreamBytesSent, 66); // sum(len)
|
EXPECT_EQ(conn->lossState.totalStreamBytesSent, 66); // sum(len)
|
||||||
|
|
||||||
EXPECT_EQ(stream1->newStreamBytesSent, 12);
|
|
||||||
EXPECT_EQ(stream2->newStreamBytesSent, 12);
|
|
||||||
EXPECT_EQ(stream3->newStreamBytesSent, 13);
|
|
||||||
|
|
||||||
// totalNewStreamBytesSent: just sum(len)
|
// totalNewStreamBytesSent: just sum(len)
|
||||||
EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 37);
|
EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 37);
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
|
@@ -315,7 +315,6 @@ struct QuicStreamState : public QuicStreamLike {
|
|||||||
retransmissionBufMetas = std::move(other.retransmissionBufMetas);
|
retransmissionBufMetas = std::move(other.retransmissionBufMetas);
|
||||||
lossBufMetas = std::move(other.lossBufMetas);
|
lossBufMetas = std::move(other.lossBufMetas);
|
||||||
streamLossCount = other.streamLossCount;
|
streamLossCount = other.streamLossCount;
|
||||||
newStreamBytesSent = other.newStreamBytesSent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connection that this stream is associated with.
|
// Connection that this stream is associated with.
|
||||||
@@ -485,10 +484,6 @@ struct QuicStreamState : public QuicStreamLike {
|
|||||||
|
|
||||||
uint64_t streamLossCount{0};
|
uint64_t streamLossCount{0};
|
||||||
|
|
||||||
// Total number of 'new' stream bytes sent on this stream.
|
|
||||||
// Does not include retransmissions of stream bytes.
|
|
||||||
uint64_t newStreamBytesSent{0};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert a new WriteBufferMeta into lossBufMetas. If the new WriteBufferMeta
|
* Insert a new WriteBufferMeta into lossBufMetas. If the new WriteBufferMeta
|
||||||
* can be append to an existing WriteBufferMeta, it will be appended. Note
|
* can be append to an existing WriteBufferMeta, it will be appended. Note
|
||||||
|
Reference in New Issue
Block a user