diff --git a/quic/api/QuicSocket.h b/quic/api/QuicSocket.h index 0a2cc28c3..63081aaa3 100644 --- a/quic/api/QuicSocket.h +++ b/quic/api/QuicSocket.h @@ -261,7 +261,7 @@ class QuicSocket { // Total number of 'new' stream bytes sent on this stream. // Does not include retransmissions of stream bytes. - uint64_t newStreamBytesSent{0}; + folly::Optional streamBytesSent{0}; // Total number of stream bytes received on this stream. folly::Optional streamBytesReceived{0}; diff --git a/quic/api/QuicTransportBase.cpp b/quic/api/QuicTransportBase.cpp index 9934fa400..422c3d8d4 100644 --- a/quic/api/QuicTransportBase.cpp +++ b/quic/api/QuicTransportBase.cpp @@ -3510,7 +3510,7 @@ QuicTransportBase::getStreamTransportInfo(StreamId id) const { bool(stream->lastHolbTime), packets, stream->streamLossCount, - stream->newStreamBytesSent, + stream->finalWriteOffset, stream->finalReadOffset}; } diff --git a/quic/api/QuicTransportFunctions.cpp b/quic/api/QuicTransportFunctions.cpp index d2a053aeb..312c516fc 100644 --- a/quic/api/QuicTransportFunctions.cpp +++ b/quic/api/QuicTransportFunctions.cpp @@ -675,7 +675,6 @@ void updateConnection( maybeWriteDataBlockedAfterSocketWrite(conn); conn.streamManager->addTx(writeStreamFrame.streamId); newStreamBytesSent += writeStreamFrame.len; - stream->newStreamBytesSent += writeStreamFrame.len; } conn.streamManager->updateWritableStreams(*stream); streamBytesSent += writeStreamFrame.len; diff --git a/quic/api/test/QuicTransportFunctionsTest.cpp b/quic/api/test/QuicTransportFunctionsTest.cpp index 42b12456c..49e283973 100644 --- a/quic/api/test/QuicTransportFunctionsTest.cpp +++ b/quic/api/test/QuicTransportFunctionsTest.cpp @@ -541,9 +541,6 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketRetrans) { // total = 48 EXPECT_EQ(conn->lossState.totalStreamBytesSent, 48); // sum(len) - EXPECT_EQ(stream1->newStreamBytesSent, 12); - EXPECT_EQ(stream2->newStreamBytesSent, 12); - // totalNewStreamBytesSent: just sum(len) EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 24); EXPECT_EQ( @@ -734,10 +731,6 @@ TEST_F( // total = 66 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) EXPECT_EQ(conn->lossState.totalNewStreamBytesSent, 37); EXPECT_EQ( diff --git a/quic/state/StreamData.h b/quic/state/StreamData.h index 3379f429c..7caf0697c 100644 --- a/quic/state/StreamData.h +++ b/quic/state/StreamData.h @@ -315,7 +315,6 @@ struct QuicStreamState : public QuicStreamLike { retransmissionBufMetas = std::move(other.retransmissionBufMetas); lossBufMetas = std::move(other.lossBufMetas); streamLossCount = other.streamLossCount; - newStreamBytesSent = other.newStreamBytesSent; } // Connection that this stream is associated with. @@ -485,10 +484,6 @@ struct QuicStreamState : public QuicStreamLike { 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 * can be append to an existing WriteBufferMeta, it will be appended. Note