Enhance the error message when quic::BandwidthSampler's in-flight packet map exceeds the max number of tracked packets.

PiperOrigin-RevId: 346323374
Change-Id: If4f088d314ac305af18eebe2803010a4b7857827
diff --git a/quic/core/quic_transmission_info.cc b/quic/core/quic_transmission_info.cc
index 3d33c99..e4295f7 100644
--- a/quic/core/quic_transmission_info.cc
+++ b/quic/core/quic_transmission_info.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "net/third_party/quiche/src/quic/core/quic_transmission_info.h"
+#include "absl/strings/str_cat.h"
 
 namespace quic {
 
@@ -36,4 +37,19 @@
 
 QuicTransmissionInfo::~QuicTransmissionInfo() {}
 
+std::string QuicTransmissionInfo::DebugString() const {
+  return absl::StrCat(
+      "{sent_time: ", sent_time.ToDebuggingValue(),
+      ", bytes_sent: ", bytes_sent,
+      ", encryption_level: ", EncryptionLevelToString(encryption_level),
+      ", transmission_type: ", TransmissionTypeToString(transmission_type),
+      ", in_flight: ", in_flight, ", state: ", state,
+      ", has_crypto_handshake: ", has_crypto_handshake,
+      ", has_ack_frequency: ", has_ack_frequency,
+      ", first_sent_after_loss: ", first_sent_after_loss.ToString(),
+      ", largest_acked: ", largest_acked.ToString(),
+      ", retransmittable_frames: ", QuicFramesToString(retransmittable_frames),
+      "}");
+}
+
 }  // namespace quic