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

Method Step

library/cpp/netliba/v6/udp_http.cpp:654–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652 }
653 }
654 void Step() {
655 {
656 TGuard<TSpinLock> lock(cs);
657 DoSends();
658 }
659 Host->Step();
660 for (TIntrusivePtr<TStatsRequest> req; StatsReqList.Dequeue(&req);) {
661 switch (req->Req) {
662 case TStatsRequest::PENDING_SIZE:
663 Host->GetPendingDataSize(&req->PendingDataSize);
664 break;
665 case TStatsRequest::DEBUG_INFO: {
666 TGuard<TSpinLock> lock(cs);
667 req->DebugInfo = GetDebugInfoLocked();
668 } break;
669 case TStatsRequest::HAS_IN_REQUEST: {
670 TGuard<TSpinLock> lock(cs);
671 req->RequestFound = (InRequests.find(req->RequestId) != InRequests.end());
672 } break;
673 case TStatsRequest::GET_PEER_ADDRESS: {
674 TGuard<TSpinLock> lock(cs);
675 TInRequestHash::const_iterator i = InRequests.find(req->RequestId);
676 if (i != InRequests.end()) {
677 req->PeerAddress = i->second.Address;
678 } else {
679 TOutRequestHash::const_iterator o = OutRequests.find(req->RequestId);
680 if (o != OutRequests.end()) {
681 req->PeerAddress = o->second.Address;
682 } else {
683 req->PeerAddress = TUdpAddress();
684 }
685 }
686 } break;
687 case TStatsRequest::GET_PEER_QUEUE_STATS:
688 req->QueueStats = Host->GetQueueStats(req->PeerAddress);
689 break;
690 default:
691 Y_ASSERT(0);
692 break;
693 }
694 req->Complete.Signal();
695 }
696 {
697 TGuard<TSpinLock> lock(cs);
698 DoSends();
699 ProcessIncomingPackets();
700 AnalyzeSendResults();
701 SendPingsIfNeeded();
702 }
703 }
704 void Wait() {
705 Host->Wait(0.1f);
706 }

Callers 2

ExecServerThreadMethod · 0.45
GetDebugInfoFunction · 0.45

Calls 7

TUdpAddressClass · 0.70
DequeueMethod · 0.45
GetPendingDataSizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
GetQueueStatsMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected