gfe-relnote: In QUIC, add code counts for RTT status when cwnd gets bootstrapped. Not protected.

PiperOrigin-RevId: 251465876
Change-Id: I465323d7d0fd95f9266f8837055f951e1fec2c72
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index 39fecda..aa81d5a 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -358,6 +358,14 @@
         std::max(kMinInitialCongestionWindow * kDefaultTCPMSS,
                  std::min(kMaxInitialCongestionWindow * kDefaultTCPMSS,
                           bandwidth * rtt_stats_->SmoothedOrInitialRtt()));
+    if (!rtt_stats_->smoothed_rtt().IsZero()) {
+      QUIC_CODE_COUNT(quic_smoothed_rtt_available);
+    } else if (rtt_stats_->initial_rtt() !=
+               QuicTime::Delta::FromMilliseconds(kInitialRttMs)) {
+      QUIC_CODE_COUNT(quic_client_initial_rtt_available);
+    } else {
+      QUIC_CODE_COUNT(quic_default_initial_rtt);
+    }
     if (new_cwnd > congestion_window_) {
       QUIC_RELOADABLE_FLAG_COUNT_N(quic_fix_bbr_cwnd_in_bandwidth_resumption, 1,
                                    3);
diff --git a/quic/core/congestion_control/rtt_stats.cc b/quic/core/congestion_control/rtt_stats.cc
index e1a6372..40b4bcc 100644
--- a/quic/core/congestion_control/rtt_stats.cc
+++ b/quic/core/congestion_control/rtt_stats.cc
@@ -14,8 +14,6 @@
 
 namespace {
 
-// Default initial rtt used before any samples are received.
-const int kInitialRttMs = 100;
 const float kAlpha = 0.125f;
 const float kOneMinusAlpha = (1 - kAlpha);
 const float kBeta = 0.25f;
diff --git a/quic/core/quic_constants.h b/quic/core/quic_constants.h
index caac2c7..913c063 100644
--- a/quic/core/quic_constants.h
+++ b/quic/core/quic_constants.h
@@ -236,6 +236,9 @@
 // Maximum length allowed for the token in a NEW_TOKEN frame.
 const size_t kMaxNewTokenTokenLength = 0xffff;
 
+// Default initial rtt used before any samples are received.
+const int kInitialRttMs = 100;
+
 // Packet number of first sending packet of a connection. Please note, this
 // cannot be used as first received packet because peer can choose its starting
 // packet number.