Skip to content

Commit

Permalink
Log the congestion controller type to qlog
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jbeshay authored and facebook-github-bot committed Aug 11, 2023
1 parent c495882 commit 7059e2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quic/api/QuicTransportBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <quic/state/QuicStreamUtilities.h>
#include <quic/state/SimpleFrameFunctions.h>
#include <quic/state/stream/StreamSendHandlers.h>
#include <sstream>

namespace quic {

Expand Down Expand Up @@ -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());
}
}
}

Expand Down

0 comments on commit 7059e2f

Please sign in to comment.