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

Method GetPendingDataSize

library/cpp/netliba/v6/udp_client_server.cpp:519–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517 }
518
519 void GetPendingDataSize(TRequesterPendingDataStats* res) override {
520 *res = PendingDataStats;
521#ifndef NDEBUG
522 TRequesterPendingDataStats chk;
523 for (TUdpOutXferHash::const_iterator i = SendQueue.begin(); i != SendQueue.end(); ++i) {
524 TRopeDataPacket* pckt = i->second.Data.Get();
525 if (pckt) {
526 chk.OutDataSize += pckt->GetSize();
527 ++chk.OutCount;
528 }
529 }
530 for (TUdpInXferHash::const_iterator i = RecvQueue.begin(); i != RecvQueue.end(); ++i) {
531 const TUdpInTransfer& tr = i->second;
532 for (int p = 0; p < tr.GetPacketCount(); ++p) {
533 if (tr.GetPacket(p)) {
534 chk.InpDataSize += tr.PacketSize;
535 }
536 }
537 ++chk.InpCount;
538 }
539 Y_ASSERT(memcmp(&chk, res, sizeof(chk)) == 0);
540#endif
541 }
542 TString GetDebugInfo() override;
543 TString GetPeerLinkDebug(const TPeerLinkHash& ch);
544 void Kill(const TUdpAddress& addr) override;

Callers

nothing calls this directly

Calls 7

memcmpFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
GetMethod · 0.45
GetSizeMethod · 0.45
GetPacketCountMethod · 0.45
GetPacketMethod · 0.45

Tested by

no test coverage detected