NCBI C++ ToolKit
Classes | Functions | Variables
ns_perf_logging.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/perf_log.hpp>
#include "ns_perf_logging.hpp"
#include "ns_queue.hpp"
#include "job.hpp"
+ Include dependency graph for ns_perf_logging.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  JobEventToAgent
 

Functions

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 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)
 
static string g_JobEventToAgent (enum CJobEvent::EJobEvent event)
 
static string g_JobEventToVariation (enum CJobEvent::EJobEvent event)
 
static string s_FormResourceName (CNetScheduleAPI::EJobStatus from, CNetScheduleAPI::EJobStatus to)
 
void g_DoPerfLogging (const CQueue &queue, const CJob &job, int status)
 
void g_DoErasePerfLogging (const CQueue &queue, const CJob &job)
 
void g_DoPerfLogging (const CQueue &queue, const vector< TJobStatus > &statuses, const vector< unsigned int > &counters)
 

Variables

const JobEventToAgent jobEventToAgentMap []
 
const size_t jobEventToAgentMapSize
 

Function Documentation

◆ g_DoErasePerfLogging()

void g_DoErasePerfLogging ( const CQueue queue,
const CJob job 
)

◆ g_DoPerfLogging() [1/2]

void g_DoPerfLogging ( const CQueue queue,
const CJob job,
int  status 
)

Definition at line 130 of file ns_perf_logging.cpp.

References CPerfLogger::Adjust(), CNetScheduleAPI::eDone, CNetScheduleAPI::eReading, CJobEvent::eRedo, CJobEvent::eReread, CNetScheduleAPI::eRunning, CJobEvent::eSessionChanged, CPerfLogger::eSuspend, g_JobEventToAgent(), g_JobEventToVariation(), CJob::GetEvents(), CSocketAPI::gethostbyaddr(), CJob::GetId(), CQueue::GetQueueName(), CJob::GetReadCount(), CJob::GetRunCount(), CPerfLogger::IsON(), CQueue::MakeJobKey(), CNSPreciseTime::NSec(), CPerfLogger::Post(), CDiagContext_Extra::Print(), s_AppendCommonExtras(), s_DoDonePerfLogging(), s_FormResourceName(), CNSPreciseTime::Sec(), and CQueue::ShouldPerfLogTransitions().

Referenced by CQueue::Cancel(), CNSTDatabase::ExecSP_AddAttribute(), CNSTDatabase::ExecSP_CreateClient(), CNSTDatabase::ExecSP_CreateObjectWithClientID(), CNSTDatabase::ExecSP_CreateUser(), CNSTDatabase::ExecSP_DelAttribute(), CNSTDatabase::ExecSP_DoesObjectExist(), CNSTDatabase::ExecSP_GetAttribute(), CNSTDatabase::ExecSP_GetAttributeNames(), CNSTDatabase::ExecSP_GetClientObjects(), CNSTDatabase::ExecSP_GetClients(), CNSTDatabase::ExecSP_GetGeneralDBInfo(), CNSTDatabase::ExecSP_GetObjectExpiration(), CNSTDatabase::ExecSP_GetObjectFixedAttributes(), CNSTDatabase::ExecSP_GetObjectSize(), CNSTDatabase::ExecSP_GetObjectSizeAndLocator(), CNSTDatabase::ExecSP_GetStatDBInfo(), CNSTDatabase::ExecSP_GetUserObjects(), CNSTDatabase::ExecSP_GetUsers(), CNSTDatabase::ExecSP_RemoveObject(), CNSTDatabase::ExecSP_SetExpiration(), CNSTDatabase::ExecSP_UpdateObjectOnRead(), CNSTDatabase::ExecSP_UpdateObjectOnRelocate(), CNSTDatabase::ExecSP_UpdateObjectOnWrite(), CNSTDatabase::ExecSP_UpdateObjectSizeIfNULL(), CNSTDatabase::ExecSP_UpdateUserIDForObject(), CNSTDatabase::ExecSP_UpdateUserKeyObjectOnWrite(), CQueue::FailJob(), CQueue::GetJobForReadingOrWait(), CQueue::GetJobOrWait(), CQueue::PrintJobCounters(), CQueue::PutResult(), CQueue::RedoJob(), CQueue::RereadJob(), CQueue::RescheduleJob(), CQueue::ReturnJob(), CNSTDatabase::UpdateExpirationIfExists(), CQueue::x_CancelJobs(), CQueue::x_ChangeReadingStatus(), CQueue::x_CheckExecutionTimeout(), and CQueue::x_ResetDueTo().

◆ g_DoPerfLogging() [2/2]

void g_DoPerfLogging ( const CQueue queue,
const vector< TJobStatus > &  statuses,
const vector< unsigned int > &  counters 
)

◆ g_JobEventToAgent()

static string g_JobEventToAgent ( enum CJobEvent::EJobEvent  event)
static

◆ g_JobEventToVariation()

static string g_JobEventToVariation ( enum CJobEvent::EJobEvent  event)
static

◆ s_AppendCommonExtras()

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

◆ s_DoDonePerfLogging()

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 
)
static

◆ s_FormResourceName()

static string s_FormResourceName ( CNetScheduleAPI::EJobStatus  from,
CNetScheduleAPI::EJobStatus  to 
)
static

Variable Documentation

◆ jobEventToAgentMap

const JobEventToAgent jobEventToAgentMap[]
Initial value:
= {
{ CJobEvent::eReturn, "RETURN", kEmptyStr },
{ CJobEvent::eReadRollback, "ns", "rollback" },
{ CJobEvent::eClear, "CLRN", "clear" },
{ CJobEvent::eCancel, "CANCEL", kEmptyStr },
{ CJobEvent::eTimeout, "ns", "timeout" },
{ CJobEvent::eReadTimeout, "ns", "timeout" },
{ CJobEvent::eSessionChanged, "ns", "new_session" },
{ CJobEvent::eNSGetRollback, "ns", "rollback" },
{ CJobEvent::eNSReadRollback, "ns", "rollback" },
{ CJobEvent::eReschedule, "RESCHEDULE", "reschedule" },
{ CJobEvent::eReread, "REREAD", kEmptyStr } }
@ eReturn
Definition: job.hpp:67
@ eRequest
Definition: job.hpp:65
@ eNSSubmitRollback
Definition: job.hpp:82
@ eCancel
Definition: job.hpp:77
@ eClear
Definition: job.hpp:75
@ eDone
Definition: job.hpp:66
@ eTimeout
Definition: job.hpp:78
@ eRedo
Definition: job.hpp:94
@ eReadTimeout
Definition: job.hpp:79
@ eFail
Definition: job.hpp:68
@ eBatchSubmit
Definition: job.hpp:64
@ eReadFail
Definition: job.hpp:71
@ eNSGetRollback
Definition: job.hpp:85
@ eReadRollback
Definition: job.hpp:74
@ eReadFinalFail
Definition: job.hpp:72
@ eReread
Definition: job.hpp:95
@ eReschedule
Definition: job.hpp:93
@ eReadDone
Definition: job.hpp:73
@ eReturnNoBlacklist
Definition: job.hpp:91
@ eUnknown
Definition: job.hpp:61
@ eRead
Definition: job.hpp:70
@ eSubmit
Definition: job.hpp:63
@ eSessionChanged
Definition: job.hpp:80
@ eNSReadRollback
Definition: job.hpp:88
@ eFinalFail
Definition: job.hpp:69
#define kEmptyStr
Definition: ncbistr.hpp:123

Definition at line 68 of file ns_perf_logging.cpp.

Referenced by g_JobEventToAgent(), and g_JobEventToVariation().

◆ jobEventToAgentMapSize

const size_t jobEventToAgentMapSize
Initial value:
= sizeof(jobEventToAgentMap) /
const JobEventToAgent jobEventToAgentMap[]

Definition at line 94 of file ns_perf_logging.cpp.

Referenced by g_JobEventToAgent(), and g_JobEventToVariation().

Modified on Sat Apr 20 12:17:05 2024 by modify_doxy.py rev. 669887