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

Search Toolkit Book for CGBRequestStatistics

#include <objtools/data_loaders/genbank/impl/statistics.hpp>

+ Collaboration diagram for CGBRequestStatistics:

Public Types

enum  EStatType {
  eStat_First , eStat_StringSeq_ids = 0 , eStat_Seq_idSeq_ids , eStat_Seq_idGi ,
  eStat_Seq_idAcc , eStat_Seq_idLabel , eStat_Seq_idTaxId , eStat_Seq_idBlob_ids ,
  eStat_BlobState , eStat_BlobVersion , eStat_LoadBlob , eStat_LoadSNPBlob ,
  eStat_LoadSplit , eStat_LoadChunk , eStat_ParseBlob , eStat_ParseSNPBlob ,
  eStat_ParseSplit , eStat_ParseChunk , eStat_AttachBlob , eStat_AttachSNPBlob ,
  eStat_AttachSplit , eStat_AttachChunk , eStat_Hash , eStat_Length ,
  eStat_Type , eStats_Count , eStat_Last = eStats_Count-1
}
 

Public Member Functions

 CGBRequestStatistics (const char *action, const char *entity)
 
const char * GetAction (void) const
 
const char * GetEntity (void) const
 
size_t GetCount (void) const
 
double GetTime (void) const
 
double GetSize (void) const
 
void PrintStat (void) const
 
void AddTime (double time, size_t count=1)
 
void AddTimeSize (double time, double size)
 

Static Public Member Functions

static const CGBRequestStatisticsGetStatistics (EStatType type)
 
static void PrintStatistics (void)
 

Static Protected Member Functions

static void x_Add (atomic< double > &sum, double v)
 

Private Attributes

const char * m_Action
 
const char * m_Entity
 
atomic< size_t > m_Count
 
atomic< double > m_Time
 
atomic< double > m_Size
 

Detailed Description

Definition at line 39 of file statistics.hpp.

Member Enumeration Documentation

◆ EStatType

Enumerator
eStat_First 
eStat_StringSeq_ids 
eStat_Seq_idSeq_ids 
eStat_Seq_idGi 
eStat_Seq_idAcc 
eStat_Seq_idLabel 
eStat_Seq_idTaxId 
eStat_Seq_idBlob_ids 
eStat_BlobState 
eStat_BlobVersion 
eStat_LoadBlob 
eStat_LoadSNPBlob 
eStat_LoadSplit 
eStat_LoadChunk 
eStat_ParseBlob 
eStat_ParseSNPBlob 
eStat_ParseSplit 
eStat_ParseChunk 
eStat_AttachBlob 
eStat_AttachSNPBlob 
eStat_AttachSplit 
eStat_AttachChunk 
eStat_Hash 
eStat_Length 
eStat_Type 
eStats_Count 
eStat_Last 

Definition at line 42 of file statistics.hpp.

Constructor & Destructor Documentation

◆ CGBRequestStatistics()

CGBRequestStatistics::CGBRequestStatistics ( const char *  action,
const char *  entity 
)

Definition at line 97 of file dispatcher.cpp.

Member Function Documentation

◆ AddTime()

void CGBRequestStatistics::AddTime ( double  time,
size_t  count = 1 
)
inline

Definition at line 97 of file statistics.hpp.

References count.

Referenced by CReadDispatcher::LogStat().

◆ AddTimeSize()

void CGBRequestStatistics::AddTimeSize ( double  time,
double  size 
)
inline

Definition at line 102 of file statistics.hpp.

References ncbi::grid::netcache::search::fields::size.

Referenced by CReadDispatcher::LogStat().

◆ GetAction()

const char* CGBRequestStatistics::GetAction ( void  ) const
inline

Definition at line 76 of file statistics.hpp.

Referenced by PrintStat().

◆ GetCount()

size_t CGBRequestStatistics::GetCount ( void  ) const
inline

Definition at line 82 of file statistics.hpp.

Referenced by PrintStat().

◆ GetEntity()

const char* CGBRequestStatistics::GetEntity ( void  ) const
inline

Definition at line 79 of file statistics.hpp.

Referenced by PrintStat().

◆ GetSize()

double CGBRequestStatistics::GetSize ( void  ) const
inline

Definition at line 88 of file statistics.hpp.

Referenced by PrintStat().

◆ GetStatistics()

const CGBRequestStatistics & CGBRequestStatistics::GetStatistics ( EStatType  type)
static

Definition at line 104 of file dispatcher.cpp.

References eStat_Last, NCBI_THROW_FMT, sx_Statistics, and type.

◆ GetTime()

double CGBRequestStatistics::GetTime ( void  ) const
inline

Definition at line 85 of file statistics.hpp.

Referenced by PrintStat().

◆ PrintStat()

void CGBRequestStatistics::PrintStat ( void  ) const

◆ PrintStatistics()

void CGBRequestStatistics::PrintStatistics ( void  )
static

Definition at line 143 of file dispatcher.cpp.

References eStat_First, eStat_Last, PrintStat(), sx_Statistics, and type.

Referenced by CReadDispatcher::~CReadDispatcher().

◆ x_Add()

static void CGBRequestStatistics::x_Add ( atomic< double > &  sum,
double  v 
)
inlinestaticprotected

Definition at line 109 of file statistics.hpp.

Member Data Documentation

◆ m_Action

const char* CGBRequestStatistics::m_Action
private

Definition at line 117 of file statistics.hpp.

◆ m_Count

atomic<size_t> CGBRequestStatistics::m_Count
private

Definition at line 119 of file statistics.hpp.

◆ m_Entity

const char* CGBRequestStatistics::m_Entity
private

Definition at line 118 of file statistics.hpp.

◆ m_Size

atomic<double> CGBRequestStatistics::m_Size
private

Definition at line 121 of file statistics.hpp.

◆ m_Time

atomic<double> CGBRequestStatistics::m_Time
private

Definition at line 120 of file statistics.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Sep 04 14:59:22 2024 by modify_doxy.py rev. 669887