& job_key,
49 const string& client_node,
50 unsigned intclient_host,
55 intstatus,
const string& qname,
56 const string& job_key,
const string& agent,
57 const string& client_node,
58 unsigned intclient_host,
137 constvector<CJobEvent>& job_events = job.
GetEvents();
138 size_tlast_index = job_events.size() - 1;
142 if(last_index == 0 || job_events.empty())
151 TJobStatusstatus_from = job_events[last_index - 1].GetStatus();
152 TJobStatusstatus_to = job_events[last_index].GetStatus();
153 CNSPreciseTimetime_from = job_events[last_index - 1].GetTimestamp();
166 unsigned intclient_host;
168client_node = job_events[last_index - 1].GetClientNode();
169client_host = job_events[last_index - 1].GetNodeAddr();
171 stringnew_session_client_node =
172job_events[last_index].GetClientNode();
173 unsigned intnew_session_client_host =
174job_events[last_index].GetNodeAddr();
175 if(!new_session_client_node.empty())
176extra.
Print(
"new_session_client_node", new_session_client_node);
177 if(new_session_client_host != 0)
178extra.
Print(
"new_session_client_host",
181client_node = job_events[last_index].GetClientNode();
182client_host = job_events[last_index].GetNodeAddr();
207 intstatus,
const string& qname,
208 const string& job_key,
const string& agent,
209 const string& client_node,
210 unsigned intclient_host,
237 constvector<CJobEvent>& job_events = job.
GetEvents();
238 if(job_events.empty())
262 const string& job_key,
263 const string& agent,
264 const string& client_node,
265 unsigned intclient_host,
269extra.
Print(
"_queue", qname)
270.
Print(
"job_key", job_key)
271.
Print(
"agent", agent);
273 if(!client_node.empty())
274extra.
Print(
"client_node", client_node);
275 if(client_host != 0)
284 constvector<TJobStatus> & statuses,
285 constvector<unsigned int> & counters)
289 if(counters.size() != statuses.size())
292 for(
size_tk = 0; k < statuses.size(); ++k) {
302.
Print(
"count", counters[k]);
unsigned GetRunCount() const
unsigned GetReadCount() const
const vector< CJobEvent > & GetEvents() const
static CNSPreciseTime Current(void)
const string & GetQueueName() const
bool ShouldPerfLogTransitions(void) const
string MakeJobKey(unsigned int job_id) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
CDiagContext_Extra Post(CRequestStatus::ECode status, CTempString resource, CTempString status_msg=CTempString())
Log the timing; stop and deactivate the timer.
void Adjust(CTimeSpan timespan)
Adjust the printed elapsed time.
static bool IsON(void)
Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging",...
@ eSuspend
Do not start timer (call Start() later)
EJobStatus
Job status codes.
static string StatusToString(EJobStatus status)
Printable status type.
@ eDeleted
The job has been wiped out of the database.
@ eDone
Job is ready (computed successfully)
@ eReading
Job has its output been reading.
@ eRunning
Running on a worker node.
@ ePending
Waiting for execution.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string gethostbyaddr(const CNCBI_IPAddr &addr, ESwitch log=eOff)
Return empty string on error.
static void s_DoDonePerfLogging(const CJob &job, const CNSPreciseTime &time_to, int status, const string &qname, const string &job_key, const string &agent, const string &client_node, unsigned int client_host, const string &variation)
const JobEventToAgent jobEventToAgentMap[]
static string g_JobEventToVariation(enum CJobEvent::EJobEvent event)
static string s_FormResourceName(CNetScheduleAPI::EJobStatus from, CNetScheduleAPI::EJobStatus to)
static void s_AppendCommonExtras(const string &qname, const string &job_key, const string &agent, const string &client_node, unsigned int client_host, const string &variation, CDiagContext_Extra &extra)
static string g_JobEventToAgent(enum CJobEvent::EJobEvent event)
const size_t jobEventToAgentMapSize
void g_DoErasePerfLogging(const CQueue &queue, const CJob &job)
void g_DoPerfLogging(const CQueue &queue, const CJob &job, int status)
Defines NCBI C++ API for timing-and-logging, classes, and macros.
enum CJobEvent::EJobEvent event
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4