Record the following STARTUP stats in QUIC BBRv2:
- slowstart_packets_sent
- slowstart_packets_lost
- slowstart_bytes_sent
- slowstart_bytes_lost
- slowstart_num_rtts
PiperOrigin-RevId: 366319931
Change-Id: I9031da390bd5efc44f1d8afc45be76564a08c205
diff --git a/quic/core/congestion_control/bbr2_sender.cc b/quic/core/congestion_control/bbr2_sender.cc
index d9b1d95..8dd6f5c 100644
--- a/quic/core/congestion_control/bbr2_sender.cc
+++ b/quic/core/congestion_control/bbr2_sender.cc
@@ -236,6 +236,16 @@
model_.OnCongestionEventStart(event_time, acked_packets, lost_packets,
&congestion_event);
+ if (InSlowStart()) {
+ if (!lost_packets.empty()) {
+ connection_stats_->slowstart_packets_lost += lost_packets.size();
+ connection_stats_->slowstart_bytes_lost += congestion_event.bytes_lost;
+ }
+ if (congestion_event.end_of_round_trip) {
+ ++connection_stats_->slowstart_num_rtts;
+ }
+ }
+
// Number of mode changes allowed for this congestion event.
int mode_changes_allowed = kMaxModeChangesPerCongestionEvent;
while (true) {
@@ -369,6 +379,10 @@
<< ", total_acked:" << model_.total_bytes_acked()
<< ", total_lost:" << model_.total_bytes_lost() << " @ "
<< sent_time;
+ if (InSlowStart()) {
+ ++connection_stats_->slowstart_packets_sent;
+ connection_stats_->slowstart_bytes_sent += bytes;
+ }
if (bytes_in_flight == 0 && params().avoid_unnecessary_probe_rtt) {
OnExitQuiescence(sent_time);
}