NCBI C++ ToolKit
|
Search Toolkit Book for CPSGSCounters
#include "pubseq_gateway_stat.hpp"
(Private to src/app/pubseq_gateway/server
.)
Classes | |
struct | SCounterInfo |
Public Member Functions | |
CPSGSCounters (const map< string, size_t > &proc_group_to_index) | |
~CPSGSCounters () | |
void | Increment (IPSGS_Processor *processor, EPSGS_CounterType counter) |
void | IncrementRequestStopCounter (int status) |
void | UpdateConfiguredNameDescription (const map< string, tuple< string, string >> &conf) |
void | Reset (void) |
void | PopulateDictionary (CJsonNode &dict) |
void | AppendValueNode (CJsonNode &dict, const string &id, const string &name, const string &description, uint64_t value) |
void | AppendValueNode (CJsonNode &dict, const string &id, const string &name, const string &description, bool value) |
void | AppendValueNode (CJsonNode &dict, const string &id, const string &name, const string &description, const string &value) |
void | AppendValueNode (CJsonNode &dict, EPSGS_CounterType counter_type, uint64_t value) |
void | AppendValueNode (CJsonNode &dict, EPSGS_CounterType counter_type, bool value) |
void | AppendValueNode (CJsonNode &dict, EPSGS_CounterType counter_type, const string &value) |
Static Public Member Functions | |
static EPSGS_CounterType | StatusToCounterType (int status) |
static bool | IsPerProcessorCounter (EPSGS_CounterType counter) |
Private Attributes | |
map< string, size_t > | m_ProcGroupToIndex |
SCounterInfo * | m_Counters [ePSGS_MaxIndividualCounter] |
vector< vector< SCounterInfo * > > | m_PerProcessorCounters |
Definition at line 41 of file pubseq_gateway_stat.hpp.
Definition at line 48 of file pubseq_gateway_stat.hpp.
Definition at line 45 of file pubseq_gateway_stat.cpp.
References ePSGS_100, ePSGS_101, ePSGS_200, ePSGS_201, ePSGS_202, ePSGS_203, ePSGS_204, ePSGS_205, ePSGS_206, ePSGS_299, ePSGS_300, ePSGS_301, ePSGS_302, ePSGS_303, ePSGS_304, ePSGS_305, ePSGS_307, ePSGS_400, ePSGS_401, ePSGS_402, ePSGS_403, ePSGS_404, ePSGS_405, ePSGS_406, ePSGS_407, ePSGS_408, ePSGS_409, ePSGS_410, ePSGS_411, ePSGS_412, ePSGS_413, ePSGS_414, ePSGS_415, ePSGS_416, ePSGS_417, ePSGS_422, ePSGS_499, ePSGS_500, ePSGS_501, ePSGS_502, ePSGS_503, ePSGS_504, ePSGS_505, ePSGS_AcceptFailure, ePSGS_AccessionVersionHistory, ePSGS_AccVerHistoryNotFound, ePSGS_ActiveProcessorGroups, ePSGS_AdminRequest, ePSGS_AnnotationBlobNotFound, ePSGS_AnnotationNotFound, CPSGSCounters::SCounterInfo::ePSGS_Arbitrary, ePSGS_BackloggedRequests, ePSGS_BadUrlPath, ePSGS_BioseqInfoCacheHit, ePSGS_BioseqInfoCacheMiss, ePSGS_BioseqInfoError, ePSGS_BioseqInfoFoundMany, ePSGS_BioseqInfoFoundOne, ePSGS_BioseqInfoNotFound, ePSGS_BlobPropCacheHit, ePSGS_BlobPropCacheMiss, ePSGS_BlobPropsNotFound, ePSGS_CassandraActiveStatements, ePSGS_CassQueryTimeoutError, ePSGS_ClientSatToSatNameError, ePSGS_DeepHealthRequest, ePSGS_DestroyedProcessorCallbacks, ePSGS_FailureToGetCassConnectionCounter, ePSGS_FrameworkUnknownError, ePSGS_GetBlobBySatSatKeyRequest, ePSGS_GetBlobBySeqIdRequest, ePSGS_GetBlobNotFound, ePSGS_GetNamedAnnotations, ePSGS_GetTSEChunk, ePSGS_GracefulShutdownExpiredInSec, ePSGS_HealthRequest, ePSGS_HealthZRequest, ePSGS_IncludeHUPSetToNo, ePSGS_InputSeqIdNotResolved, ePSGS_InsufficientArgs, ePSGS_InvalidId2InfoError, ePSGS_IPGResolve, ePSGS_IPGResolveNotFound, ePSGS_LastCounter, ePSGS_LiveZRequest, ePSGS_LMDBError, ePSGS_MalformedArgs, ePSGS_MaxHopsExceededError, ePSGS_MaxIndividualCounter, ePSGS_MyNCBIErrorCacheHit, ePSGS_MyNCBIErrorCacheMiss, ePSGS_MyNCBIErrorCacheSize, ePSGS_MyNCBIErrorCounter, ePSGS_MyNCBINotFoundCacheHit, ePSGS_MyNCBINotFoundCacheMiss, ePSGS_MyNCBINotFoundCacheSize, ePSGS_MyNCBINotFoundCounter, ePSGS_MyNCBIOKCacheHit, ePSGS_MyNCBIOKCacheMiss, ePSGS_MyNCBIOKCacheSize, ePSGS_MyNCBIOKCacheWaitHit, ePSGS_NonProtocolRequests, ePSGS_NoProcessorInstantiated, ePSGS_NoRequestStop, ePSGS_NoWebCubbyUserCookie, ePSGS_NumberOfConnections, ePSGS_OpTooLong, ePSGS_ProcUnknownError, ePSGS_PublicCommentNotFound, ePSGS_ReadyZCassandraRequest, ePSGS_ReadyZCDDRequest, ePSGS_ReadyZLMDBRequest, ePSGS_ReadyZRequest, ePSGS_ReadyZSNPRequest, ePSGS_ReadyZWGSRequest, ePSGS_ResolveRequest, ePSGS_SecureSatUnauthorizedCounter, ePSGS_ServerSatToSatNameError, ePSGS_ShutdownRequested, ePSGS_Si2csiCacheHit, ePSGS_Si2csiCacheMiss, ePSGS_Si2csiError, ePSGS_Si2csiFoundMany, ePSGS_Si2csiFoundOne, ePSGS_Si2csiNotFound, ePSGS_SplitHistoryNotFound, ePSGS_SplitInfoCacheSize, ePSGS_TestIORequest, ePSGS_TooManyRequests, ePSGS_TSEChunkNotFound, ePSGS_TSEChunkSplitVersionCacheMatched, ePSGS_TSEChunkSplitVersionCacheNotMatched, ePSGS_xxx, m_Counters, m_PerProcessorCounters, m_ProcGroupToIndex, and map_checker< Container >::size().
CPSGSCounters::~CPSGSCounters | ( | ) |
Definition at line 651 of file pubseq_gateway_stat.cpp.
References ePSGS_MaxIndividualCounter, m_Counters, and m_PerProcessorCounters.
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
const string & | id, | ||
const string & | name, | ||
const string & | description, | ||
bool | value | ||
) |
Definition at line 836 of file pubseq_gateway_stat.cpp.
References kDescription(), kName(), kValue(), CJsonNode::NewObjectNode(), CJsonNode::SetBoolean(), CJsonNode::SetByKey(), CJsonNode::SetString(), and rapidjson::value.
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
const string & | id, | ||
const string & | name, | ||
const string & | description, | ||
const string & | value | ||
) |
Definition at line 850 of file pubseq_gateway_stat.cpp.
References kDescription(), kName(), kValue(), CJsonNode::NewObjectNode(), CJsonNode::SetByKey(), CJsonNode::SetString(), and rapidjson::value.
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
const string & | id, | ||
const string & | name, | ||
const string & | description, | ||
uint64_t | value | ||
) |
Definition at line 823 of file pubseq_gateway_stat.cpp.
References kDescription(), kName(), kValue(), CJsonNode::NewObjectNode(), CJsonNode::SetByKey(), CJsonNode::SetInteger(), CJsonNode::SetString(), and rapidjson::value.
Referenced by AppendValueNode(), and PopulateDictionary().
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
EPSGS_CounterType | counter_type, | ||
bool | value | ||
) |
Definition at line 876 of file pubseq_gateway_stat.cpp.
References AppendValueNode(), m_Counters, and rapidjson::value.
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
EPSGS_CounterType | counter_type, | ||
const string & | value | ||
) |
Definition at line 888 of file pubseq_gateway_stat.cpp.
References AppendValueNode(), m_Counters, and rapidjson::value.
void CPSGSCounters::AppendValueNode | ( | CJsonNode & | dict, |
EPSGS_CounterType | counter_type, | ||
uint64_t | value | ||
) |
Definition at line 864 of file pubseq_gateway_stat.cpp.
References AppendValueNode(), m_Counters, and rapidjson::value.
void CPSGSCounters::Increment | ( | IPSGS_Processor * | processor, |
EPSGS_CounterType | counter | ||
) |
Definition at line 665 of file pubseq_gateway_stat.cpp.
References ePSGS_LastCounter, ePSGS_MaxIndividualCounter, IPSGS_Processor::GetGroupName(), IsPerProcessorCounter(), m_Counters, m_PerProcessorCounters, m_ProcGroupToIndex, CPSGSCounters::SCounterInfo::m_Value, and PSG_ERROR.
Referenced by CPSGS_Dispatcher::EraseProcessorGroup(), IncrementRequestStopCounter(), CPSGS_CassBlobBase::OnGetBlobChunk(), CPSGS_TSEChunkProcessor::OnGetBlobChunk(), CTcpWorker::OnTcpConnection(), CPSGS_AccessionVersionHistoryProcessor::x_OnAccVerHistData(), CPSGS_AsyncBioseqInfoBase::x_OnBioseqInfoError(), CPSGS_AsyncResolveBase::x_OnBioseqInfoError(), CPSGS_IPGResolveProcessor::x_OnIPGResolveData(), CPSGS_AnnotProcessor::x_OnNamedAnnotData(), CPSGS_IPGResolveProcessor::x_OnSeqIdResolveFinished(), and CPSGS_AsyncResolveBase::x_OnSi2csiError().
void CPSGSCounters::IncrementRequestStopCounter | ( | int | status | ) |
Definition at line 751 of file pubseq_gateway_stat.cpp.
References Increment(), and StatusToCounterType().
Referenced by CTcpWorker::OnTcpConnection(), and CPSGS_Dispatcher::x_PrintRequestStop().
|
inlinestatic |
Definition at line 197 of file pubseq_gateway_stat.hpp.
References ePSGS_MaxIndividualCounter.
Referenced by Increment().
void CPSGSCounters::PopulateDictionary | ( | CJsonNode & | dict | ) |
Definition at line 782 of file pubseq_gateway_stat.cpp.
References AppendValueNode(), ePSGS_MaxIndividualCounter, CPSGSCounters::SCounterInfo::ePSGS_Monotonic, m_Counters, m_PerProcessorCounters, CPSGSCounters::SCounterInfo::m_Value, and rapidjson::value.
void CPSGSCounters::Reset | ( | void | ) |
Definition at line 807 of file pubseq_gateway_stat.cpp.
References ePSGS_MaxIndividualCounter, CPSGSCounters::SCounterInfo::ePSGS_Monotonic, m_Counters, m_PerProcessorCounters, and CPSGSCounters::SCounterInfo::m_Value.
|
static |
Definition at line 700 of file pubseq_gateway_stat.cpp.
References ePSGS_100, ePSGS_101, ePSGS_200, ePSGS_201, ePSGS_202, ePSGS_203, ePSGS_204, ePSGS_205, ePSGS_206, ePSGS_299, ePSGS_300, ePSGS_301, ePSGS_302, ePSGS_303, ePSGS_304, ePSGS_305, ePSGS_307, ePSGS_400, ePSGS_401, ePSGS_402, ePSGS_403, ePSGS_404, ePSGS_405, ePSGS_406, ePSGS_407, ePSGS_408, ePSGS_409, ePSGS_410, ePSGS_411, ePSGS_412, ePSGS_413, ePSGS_414, ePSGS_415, ePSGS_416, ePSGS_417, ePSGS_422, ePSGS_499, ePSGS_500, ePSGS_501, ePSGS_502, ePSGS_503, ePSGS_504, ePSGS_505, and ePSGS_xxx.
Referenced by IncrementRequestStopCounter().
void CPSGSCounters::UpdateConfiguredNameDescription | ( | const map< string, tuple< string, string >> & | conf | ) |
Definition at line 757 of file pubseq_gateway_stat.cpp.
References ePSGS_MaxIndividualCounter, m_Counters, CPSGSCounters::SCounterInfo::m_Description, CPSGSCounters::SCounterInfo::m_Name, and m_PerProcessorCounters.
|
private |
Definition at line 258 of file pubseq_gateway_stat.hpp.
Referenced by AppendValueNode(), CPSGSCounters(), Increment(), PopulateDictionary(), Reset(), UpdateConfiguredNameDescription(), and ~CPSGSCounters().
|
private |
Definition at line 259 of file pubseq_gateway_stat.hpp.
Referenced by CPSGSCounters(), Increment(), PopulateDictionary(), Reset(), UpdateConfiguredNameDescription(), and ~CPSGSCounters().
Definition at line 257 of file pubseq_gateway_stat.hpp.
Referenced by CPSGSCounters(), and Increment().