MCPcopy Create free account
hub / github.com/catboost/catboost / GetPeerLinkDebug

Method GetPeerLinkDebug

library/cpp/netliba/v6/udp_client_server.cpp:1208–1223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1206 }
1207
1208 TString TUdpHost::GetPeerLinkDebug(const TPeerLinkHash& ch) {
1209 TString res;
1210 char buf[1000];
1211 for (const auto& i : ch) {
1212 const TUdpAddress& ip = i.first;
1213 const TCongestionControl& cc = *i.second.UdpCongestion;
1214 IIBPeer* ibPeer = i.second.IBPeer.Get();
1215 snprintf(buf, sizeof(buf), "%s\tIB: %d, RTT: %g Timeout: %g Window: %g MaxWin: %g FailRate: %g TimeSinceLastRecv: %g Transfers: %d MTU: %d\n",
1216 GetAddressAsString(ip).c_str(),
1217 ibPeer ? ibPeer->GetState() : -1,
1218 cc.GetRTT() * 1000, cc.GetTimeout() * 1000, cc.GetWindow(), cc.GetMaxWindow(), cc.GetFailRate(),
1219 cc.GetTimeSinceLastRecv() * 1000, cc.GetTransferCount(), cc.GetMTU());
1220 res += buf;
1221 }
1222 return res;
1223 }
1224
1225 TString TUdpHost::GetDebugInfo() {
1226 TString res;

Callers

nothing calls this directly

Calls 13

GetTransferCountMethod · 0.80
GetAddressAsStringFunction · 0.70
snprintfFunction · 0.50
GetMethod · 0.45
c_strMethod · 0.45
GetStateMethod · 0.45
GetRTTMethod · 0.45
GetTimeoutMethod · 0.45
GetWindowMethod · 0.45
GetMaxWindowMethod · 0.45
GetFailRateMethod · 0.45
GetTimeSinceLastRecvMethod · 0.45

Tested by

no test coverage detected