From 7059e2f13e8fe142c0c2bed3fcaddee4bfcf5639 Mon Sep 17 00:00:00 2001 From: Joseph Beshay Date: Thu, 10 Aug 2023 20:03:02 -0700 Subject: [PATCH] Log the congestion controller type to qlog Summary: With bbr, bbr_testing, and bbr2 there is no way to tell the difference between qlog traces especially during Startup. This explicitly logs whenever the congestion controller is created or changed. Reviewed By: hanidamlaj, mjoras Differential Revision: D48194475 fbshipit-source-id: 30ba5662e0fe4aa2ccb4b28696049d8aadab38db --- quic/api/QuicTransportBase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quic/api/QuicTransportBase.cpp b/quic/api/QuicTransportBase.cpp index 626f6b191..c458841b1 100644 --- a/quic/api/QuicTransportBase.cpp +++ b/quic/api/QuicTransportBase.cpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace quic { @@ -3401,6 +3402,11 @@ void QuicTransportBase::setCongestionControl(CongestionControlType type) { conn_->congestionController = conn_->congestionControllerFactory->makeCongestionController( *conn_, type); + if (conn_->qLogger) { + std::stringstream s; + s << "CCA set to " << congestionControlTypeToString(type); + conn_->qLogger->addTransportStateUpdate(s.str()); + } } }