NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CPSGSCounters Class Reference

Search Toolkit Book for CPSGSCounters

#include "pubseq_gateway_stat.hpp"
(Private to src/app/pubseq_gateway/server.)

+ Collaboration diagram for CPSGSCounters:

Classes

struct  SCounterInfo
 

Public Types

enum  EPSGS_CounterType {
  ePSGS_BadUrlPath = 0 , ePSGS_InsufficientArgs , ePSGS_MalformedArgs , ePSGS_ClientSatToSatNameError ,
  ePSGS_ServerSatToSatNameError , ePSGS_BlobPropsNotFound , ePSGS_LMDBError , ePSGS_CassQueryTimeoutError ,
  ePSGS_InvalidId2InfoError , ePSGS_SplitHistoryNotFound , ePSGS_PublicCommentNotFound , ePSGS_AccVerHistoryNotFound ,
  ePSGS_IPGResolveNotFound , ePSGS_MaxHopsExceededError , ePSGS_TSEChunkSplitVersionCacheMatched , ePSGS_TSEChunkSplitVersionCacheNotMatched ,
  ePSGS_AdminRequest , ePSGS_ResolveRequest , ePSGS_GetBlobBySeqIdRequest , ePSGS_GetBlobBySatSatKeyRequest ,
  ePSGS_GetNamedAnnotations , ePSGS_AccessionVersionHistory , ePSGS_IPGResolve , ePSGS_TestIORequest ,
  ePSGS_GetTSEChunk , ePSGS_HealthRequest , ePSGS_Si2csiCacheHit , ePSGS_Si2csiCacheMiss ,
  ePSGS_BioseqInfoCacheHit , ePSGS_BioseqInfoCacheMiss , ePSGS_BlobPropCacheHit , ePSGS_BlobPropCacheMiss ,
  ePSGS_Si2csiNotFound , ePSGS_Si2csiFoundOne , ePSGS_Si2csiFoundMany , ePSGS_BioseqInfoNotFound ,
  ePSGS_BioseqInfoFoundOne , ePSGS_BioseqInfoFoundMany , ePSGS_Si2csiError , ePSGS_BioseqInfoError ,
  ePSGS_BackloggedRequests , ePSGS_TooManyRequests , ePSGS_DestroyedProcessorCallbacks , ePSGS_NonProtocolRequests ,
  ePSGS_NoProcessorInstantiated , ePSGS_AcceptFailure , ePSGS_FrameworkUnknownError , ePSGS_NoRequestStop ,
  ePSGS_NoWebCubbyUserCookie , ePSGS_MyNCBIErrorCounter , ePSGS_MyNCBINotFoundCounter , ePSGS_SecureSatUnauthorizedCounter ,
  ePSGS_FailureToGetCassConnectionCounter , ePSGS_MyNCBIOKCacheMiss , ePSGS_MyNCBIOKCacheHit , ePSGS_MyNCBINotFoundCacheMiss ,
  ePSGS_MyNCBINotFoundCacheHit , ePSGS_MyNCBIErrorCacheMiss , ePSGS_MyNCBIErrorCacheHit , ePSGS_MyNCBIOKCacheWaitHit ,
  ePSGS_IncludeHUPSetToNo , 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_xxx , ePSGS_CassandraActiveStatements , ePSGS_NumberOfConnections , ePSGS_ActiveProcessorGroups ,
  ePSGS_ShutdownRequested , ePSGS_GracefulShutdownExpiredInSec , ePSGS_SplitInfoCacheSize , ePSGS_MyNCBIOKCacheSize ,
  ePSGS_MyNCBINotFoundCacheSize , ePSGS_MyNCBIErrorCacheSize , ePSGS_MaxIndividualCounter , ePSGS_InputSeqIdNotResolved ,
  ePSGS_AnnotationBlobNotFound , ePSGS_AnnotationNotFound , ePSGS_GetBlobNotFound , ePSGS_TSEChunkNotFound ,
  ePSGS_ProcUnknownError , ePSGS_OpTooLong , ePSGS_LastCounter
}
 

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
 
SCounterInfom_Counters [ePSGS_MaxIndividualCounter]
 
vector< vector< SCounterInfo * > > m_PerProcessorCounters
 

Detailed Description

Definition at line 41 of file pubseq_gateway_stat.hpp.

Member Enumeration Documentation

◆ EPSGS_CounterType

Enumerator
ePSGS_BadUrlPath 
ePSGS_InsufficientArgs 
ePSGS_MalformedArgs 
ePSGS_ClientSatToSatNameError 
ePSGS_ServerSatToSatNameError 
ePSGS_BlobPropsNotFound 
ePSGS_LMDBError 
ePSGS_CassQueryTimeoutError 
ePSGS_InvalidId2InfoError 
ePSGS_SplitHistoryNotFound 
ePSGS_PublicCommentNotFound 
ePSGS_AccVerHistoryNotFound 
ePSGS_IPGResolveNotFound 
ePSGS_MaxHopsExceededError 
ePSGS_TSEChunkSplitVersionCacheMatched 
ePSGS_TSEChunkSplitVersionCacheNotMatched 
ePSGS_AdminRequest 
ePSGS_ResolveRequest 
ePSGS_GetBlobBySeqIdRequest 
ePSGS_GetBlobBySatSatKeyRequest 
ePSGS_GetNamedAnnotations 
ePSGS_AccessionVersionHistory 
ePSGS_IPGResolve 
ePSGS_TestIORequest 
ePSGS_GetTSEChunk 
ePSGS_HealthRequest 
ePSGS_Si2csiCacheHit 
ePSGS_Si2csiCacheMiss 
ePSGS_BioseqInfoCacheHit 
ePSGS_BioseqInfoCacheMiss 
ePSGS_BlobPropCacheHit 
ePSGS_BlobPropCacheMiss 
ePSGS_Si2csiNotFound 
ePSGS_Si2csiFoundOne 
ePSGS_Si2csiFoundMany 
ePSGS_BioseqInfoNotFound 
ePSGS_BioseqInfoFoundOne 
ePSGS_BioseqInfoFoundMany 
ePSGS_Si2csiError 
ePSGS_BioseqInfoError 
ePSGS_BackloggedRequests 
ePSGS_TooManyRequests 
ePSGS_DestroyedProcessorCallbacks 
ePSGS_NonProtocolRequests 
ePSGS_NoProcessorInstantiated 
ePSGS_AcceptFailure 
ePSGS_FrameworkUnknownError 
ePSGS_NoRequestStop 
ePSGS_NoWebCubbyUserCookie 
ePSGS_MyNCBIErrorCounter 
ePSGS_MyNCBINotFoundCounter 
ePSGS_SecureSatUnauthorizedCounter 
ePSGS_FailureToGetCassConnectionCounter 
ePSGS_MyNCBIOKCacheMiss 
ePSGS_MyNCBIOKCacheHit 
ePSGS_MyNCBINotFoundCacheMiss 
ePSGS_MyNCBINotFoundCacheHit 
ePSGS_MyNCBIErrorCacheMiss 
ePSGS_MyNCBIErrorCacheHit 
ePSGS_MyNCBIOKCacheWaitHit 
ePSGS_IncludeHUPSetToNo 
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_xxx 
ePSGS_CassandraActiveStatements 
ePSGS_NumberOfConnections 
ePSGS_ActiveProcessorGroups 
ePSGS_ShutdownRequested 
ePSGS_GracefulShutdownExpiredInSec 
ePSGS_SplitInfoCacheSize 
ePSGS_MyNCBIOKCacheSize 
ePSGS_MyNCBINotFoundCacheSize 
ePSGS_MyNCBIErrorCacheSize 
ePSGS_MaxIndividualCounter 
ePSGS_InputSeqIdNotResolved 
ePSGS_AnnotationBlobNotFound 
ePSGS_AnnotationNotFound 
ePSGS_GetBlobNotFound 
ePSGS_TSEChunkNotFound 
ePSGS_ProcUnknownError 
ePSGS_OpTooLong 
ePSGS_LastCounter 

Definition at line 48 of file pubseq_gateway_stat.hpp.

Constructor & Destructor Documentation

◆ CPSGSCounters()

CPSGSCounters::CPSGSCounters ( const map< string, size_t > &  proc_group_to_index)

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_DestroyedProcessorCallbacks, ePSGS_FailureToGetCassConnectionCounter, ePSGS_FrameworkUnknownError, ePSGS_GetBlobBySatSatKeyRequest, ePSGS_GetBlobBySeqIdRequest, ePSGS_GetBlobNotFound, ePSGS_GetNamedAnnotations, ePSGS_GetTSEChunk, ePSGS_GracefulShutdownExpiredInSec, ePSGS_HealthRequest, ePSGS_IncludeHUPSetToNo, ePSGS_InputSeqIdNotResolved, ePSGS_InsufficientArgs, ePSGS_InvalidId2InfoError, ePSGS_IPGResolve, ePSGS_IPGResolveNotFound, ePSGS_LastCounter, 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_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::~CPSGSCounters ( )

Member Function Documentation

◆ AppendValueNode() [1/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
const string id,
const string name,
const string description,
bool  value 
)

◆ AppendValueNode() [2/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
const string id,
const string name,
const string description,
const string value 
)

◆ AppendValueNode() [3/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
const string id,
const string name,
const string description,
uint64_t  value 
)

◆ AppendValueNode() [4/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
EPSGS_CounterType  counter_type,
bool  value 
)

Definition at line 840 of file pubseq_gateway_stat.cpp.

References AppendValueNode(), m_Counters, and rapidjson::value.

◆ AppendValueNode() [5/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
EPSGS_CounterType  counter_type,
const string value 
)

Definition at line 852 of file pubseq_gateway_stat.cpp.

References AppendValueNode(), m_Counters, and rapidjson::value.

◆ AppendValueNode() [6/6]

void CPSGSCounters::AppendValueNode ( CJsonNode dict,
EPSGS_CounterType  counter_type,
uint64_t  value 
)

Definition at line 828 of file pubseq_gateway_stat.cpp.

References AppendValueNode(), m_Counters, and rapidjson::value.

◆ Increment()

void CPSGSCounters::Increment ( IPSGS_Processor processor,
EPSGS_CounterType  counter 
)

◆ IncrementRequestStopCounter()

void CPSGSCounters::IncrementRequestStopCounter ( int  status)

◆ IsPerProcessorCounter()

static bool CPSGSCounters::IsPerProcessorCounter ( EPSGS_CounterType  counter)
inlinestatic

Definition at line 188 of file pubseq_gateway_stat.hpp.

References ePSGS_MaxIndividualCounter.

Referenced by Increment().

◆ PopulateDictionary()

void CPSGSCounters::PopulateDictionary ( CJsonNode dict)

◆ Reset()

void CPSGSCounters::Reset ( void  )

◆ StatusToCounterType()

CPSGSCounters::EPSGS_CounterType CPSGSCounters::StatusToCounterType ( int  status)
static

◆ UpdateConfiguredNameDescription()

void CPSGSCounters::UpdateConfiguredNameDescription ( const map< string, tuple< string, string >> &  conf)

Member Data Documentation

◆ m_Counters

SCounterInfo* CPSGSCounters::m_Counters[ePSGS_MaxIndividualCounter]
private

◆ m_PerProcessorCounters

vector<vector<SCounterInfo *> > CPSGSCounters::m_PerProcessorCounters
private

◆ m_ProcGroupToIndex

map<string, size_t> CPSGSCounters::m_ProcGroupToIndex
private

Definition at line 248 of file pubseq_gateway_stat.hpp.

Referenced by CPSGSCounters(), and Increment().


The documentation for this class was generated from the following files:
Modified on Sun May 19 04:48:50 2024 by modify_doxy.py rev. 669887