gfe-relnote: Refactor how QuicConnectionStats.slowstart_duration is calculated in QUIC BBR1, and start populate it in QUIC BBR2. Not protected. (Worst case we get some incorrect values in transport connection stats)
Similar to slowstart_duration, I will add drain_duration, probe_rtt_duration, probe_bw_(down|up|cruise)_duration, in a follow up CL.
PiperOrigin-RevId: 282224334
Change-Id: I873c39dcd47eb03d22d245cdfbf13aabc1a814e6
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index ba3c081..bd0343b 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -1077,16 +1077,12 @@
}
QuicTime::Delta QuicSentPacketManager::GetSlowStartDuration() const {
- if (send_algorithm_->GetCongestionControlType() != kBBR) {
- return QuicTime::Delta::Infinite();
+ if (send_algorithm_->GetCongestionControlType() == kBBR ||
+ send_algorithm_->GetCongestionControlType() == kBBRv2) {
+ return stats_->slowstart_duration.GetTotalElapsedTime(
+ clock_->ApproximateNow());
}
-
- if (!send_algorithm_->InSlowStart()) {
- return stats_->slowstart_duration;
- }
-
- return clock_->ApproximateNow() - stats_->slowstart_start_time +
- stats_->slowstart_duration;
+ return QuicTime::Delta::Infinite();
}
std::string QuicSentPacketManager::GetDebugState() const {