gfe-relnote: Add some bbr startup stats into QuicConnectionStats. Stats only. Not protected.

PiperOrigin-RevId: 241339065
Change-Id: Idef0c196eb0ab6bbe202a33d79e65a88a43678fd
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index 72c5c0f..89757de 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -13,6 +13,7 @@
 #include "net/third_party/quiche/src/quic/core/proto/cached_network_parameters.pb.h"
 #include "net/third_party/quiche/src/quic/core/quic_connection_stats.h"
 #include "net/third_party/quiche/src/quic/core/quic_pending_retransmission.h"
+#include "net/third_party/quiche/src/quic/core/quic_types.h"
 #include "net/third_party/quiche/src/quic/core/quic_utils.h"
 #include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
@@ -1014,6 +1015,19 @@
   return retransmission_delay;
 }
 
+QuicTime::Delta QuicSentPacketManager::GetSlowStartDuration() const {
+  if (send_algorithm_->GetCongestionControlType() != kBBR) {
+    return QuicTime::Delta::Infinite();
+  }
+
+  if (!send_algorithm_->InSlowStart()) {
+    return stats_->slowstart_duration;
+  }
+
+  return clock_->ApproximateNow() - stats_->slowstart_start_time +
+         stats_->slowstart_duration;
+}
+
 std::string QuicSentPacketManager::GetDebugState() const {
   return send_algorithm_->GetDebugState();
 }