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

Method GetDebugInfoLocked

library/cpp/netliba/v6/udp_http.cpp:1036–1077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1034 return false;
1035 }
1036 TString GetDebugInfoLocked() {
1037 TString res = KeepRunning ? "State: running\n" : "State: stopping\n";
1038 res += Host->GetDebugInfo();
1039
1040 char buf[1000];
1041 TRequesterUserQueueSizes* qs = QueueSizes.Get();
1042 snprintf(buf, sizeof(buf), "\nRequest queue %d (%d bytes)\n", (int)AtomicGet(qs->ReqCount), (int)AtomicGet(qs->ReqQueueSize));
1043 res += buf;
1044 snprintf(buf, sizeof(buf), "Response queue %d (%d bytes)\n", (int)AtomicGet(qs->RespCount), (int)AtomicGet(qs->RespQueueSize));
1045 res += buf;
1046
1047 const char* outReqStateNames[] = {
1048 "S_SENDING",
1049 "S_WAITING",
1050 "S_WAITING_PING_SENDING",
1051 "S_WAITING_PING_SENT",
1052 "S_CANCEL_AFTER_SENDING"};
1053 const char* inReqStateNames[] = {
1054 "S_WAITING",
1055 "S_RESPONSE_SENDING",
1056 "S_CANCELED"};
1057 res += "\nOut requests:\n";
1058 for (TOutRequestHash::const_iterator i = OutRequests.begin(); i != OutRequests.end(); ++i) {
1059 const TGUID& gg = i->first;
1060 const TOutRequestState& s = i->second;
1061 bool isSync = SyncRequests.find(gg) != SyncRequests.end();
1062 snprintf(buf, sizeof(buf), "%s\t%s %s TimePassed: %g %s\n",
1063 GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), outReqStateNames[s.State],
1064 s.TimePassed * 1000,
1065 isSync ? "isSync" : "");
1066 res += buf;
1067 }
1068 res += "\nIn requests:\n";
1069 for (TInRequestHash::const_iterator i = InRequests.begin(); i != InRequests.end(); ++i) {
1070 const TGUID& gg = i->first;
1071 const TInRequestState& s = i->second;
1072 snprintf(buf, sizeof(buf), "%s\t%s %s\n",
1073 GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), inReqStateNames[s.State]);
1074 res += buf;
1075 }
1076 return res;
1077 }
1078 TString GetDebugInfo() override {
1079 TIntrusivePtr<TStatsRequest> req = new TStatsRequest(TStatsRequest::DEBUG_INFO);
1080 ExecStatsRequest(req);

Callers

nothing calls this directly

Calls 10

GetGuidAsStringFunction · 0.85
GetAddressAsStringFunction · 0.70
snprintfFunction · 0.50
AtomicGetFunction · 0.50
GetDebugInfoMethod · 0.45
GetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected