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

Method LocalExec

library/cpp/par/par_remote.cpp:348–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 }
347
348 void TRemoteQueryProcessor::TRunPingCmd::LocalExec(int) {
349 CHROMIUM_TRACE_FUNCTION();
350 auto* requester = QueryProc->Requester.Get();
351 TAllPingResults stats;
352 float totalTime = 0;
353 for (int i = 0; i < BaseSearcherAddrs.ysize() * 10; ++i) {
354 int compId = RandomNumber(BaseSearcherAddrs.size());
355 TVector<char> pingPkt;
356 pingPkt.resize(100 * 1000);
357 const TNetworkAddress& addr = BaseSearcherAddrs[compId];
358 NHPTimer::STime tStart;
359 NHPTimer::GetTime(&tStart);
360 TAutoPtr<TNetworkResponse> answer = requester->Request(addr, "ping", &pingPkt);
361 float ping = (float)NHPTimer::GetTimePassed(&tStart);
362 stats.PingResults.push_back(TPingResult(compId, ping));
363
364 totalTime += ping;
365 if (totalTime > PING_ITERATION_TIME)
366 break;
367 }
368 TVector<char> responseData;
369 SerializeToMem(&responseData, stats);
370 QueryProc->SendReply(ReqId, &responseData);
371 QueryProc = nullptr;
372 }
373 void NPar::TRemoteQueryProcessor::TGatherStatsCmd::NewRequest(TRemoteQueryProcessor* p, TNetworkRequest* req) {
374 TVector<char> tmp;
375 SerializeToMem(&tmp, *Singleton<TParHostStats>());

Callers

nothing calls this directly

Calls 9

TPingResultClass · 0.85
SerializeToMemFunction · 0.85
GetMethod · 0.45
ysizeMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
RequestMethod · 0.45
push_backMethod · 0.45
SendReplyMethod · 0.45

Tested by

no test coverage detected