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

Search Toolkit Book for CBlastUsageReport

#include <algo/blast/api/blast_usage_report.hpp>

+ Inheritance diagram for CBlastUsageReport:
+ Collaboration diagram for CBlastUsageReport:

Public Types

enum  EUsageParams {
  eApp , eVersion , eProgram , eTask ,
  eExitStatus , eRunTime , eDBName , eDBLength ,
  eDBNumSeqs , eDBDate , eBl2seq , eNumSubjects ,
  eSubjectsLength , eNumQueries , eTotalQueryLength , eEvalueThreshold ,
  eNumThreads , eHitListSize , eOutputFmt , eTaxIdList ,
  eNegTaxIdList , eGIList , eNegGIList , eSeqIdList ,
  eNegSeqIdList , eIPGList , eNegIPGList , eMaskAlgo ,
  eCompBasedStats , eRange , eMTMode , eNumQueryBatches ,
  eNumErrStatus , ePSSMInput , eConverged , eArchiveInput ,
  eRIDInput , eDBInfo , eDBTaxInfo , eDBEntry ,
  eDBDumpAll , eDBType , eInputType , eParseSeqIDs ,
  eSeqType , eDBTest , eDBAliasMode , eDocker ,
  eGCP , eAWS , eELBJobId , eELBBatchNum ,
  eSRA , eELBVersion
}
 
- Public Types inherited from CUsageReport
enum  EWait { eAlways , eSkipIfNoConnection }
 Wait behavior. More...
 
- Public Types inherited from CUsageReportBase
enum  EWhat {
  fNone = 0 , fAppName = 1 << 1 , fAppVersion = 1 << 2 , fOS = 1 << 3 ,
  fHost = 1 << 4 , fDefault = fAppName | fAppVersion | fOS
}
 Defines what information should be reported by default by all reporters, in addition to passed parameters for Send() method. More...
 
typedef int TWhat
 Binary OR of "EWhat". More...
 

Public Member Functions

 CBlastUsageReport ()
 
 ~CBlastUsageReport ()
 
void AddParam (EUsageParams p, int val)
 
void AddParam (EUsageParams p, const string &val)
 
void AddParam (EUsageParams p, const double &val)
 
void AddParam (EUsageParams p, Int8 val)
 
void AddParam (EUsageParams p, bool val)
 
- Public Member Functions inherited from CUsageReport
 CUsageReport (TWhat what=fDefault, const string &url=string(), unsigned max_queue_size=0)
 Constructor. More...
 
virtual ~CUsageReport (void)
 Destructor. More...
 
void SetEnabled (bool enable=true)
 Enable or disable usage reporter (current instance only). More...
 
bool IsEnabled (void)
 Indicates whether application usage statistics collection is enabled for a current reporter instance. More...
 
void Send (void)
 Report usage statistics (asynchronously), default parameters. More...
 
void Send (CUsageReportParameters &params)
 Report usage statistics (asynchronously). More...
 
template<typename TJob >
void Send (TJob &job)
 Report usage statistics (asynchronously) (advanced version). More...
 
unsigned GetQueueSize (void)
 Get number of jobs in the queue – number of unprocessed yet jobs. More...
 
void ClearQueue (void)
 Remove all unprocessed reporting jobs from queue. More...
 
void Wait (EWait how=eAlways, CTimeout timeout=CTimeout(CTimeout::eDefault))
 Wait until all queued jobs starts to process and queue is empty. More...
 
void Finish (void)
 Finish reporting for the current reporting object. More...
 
bool CheckConnection ()
 Check that connection to the reporting URL can be established. More...
 

Static Public Attributes

static const int kNumRetries =0
 
static const int kTimeout =10
 

Private Member Functions

void x_CheckBlastUsageEnv ()
 
string x_EUsageParmsToString (EUsageParams p)
 
void x_CheckRunEnv ()
 

Private Attributes

CUsageReportParameters m_Params
 

Additional Inherited Members

- Static Public Member Functions inherited from CUsageReport
static CUsageReportInstance (void)
 Return global instance of CUsageReport. More...
 

Detailed Description

Definition at line 43 of file blast_usage_report.hpp.

Member Enumeration Documentation

◆ EUsageParams

Enumerator
eApp 
eVersion 
eProgram 
eTask 
eExitStatus 
eRunTime 
eDBName 
eDBLength 
eDBNumSeqs 
eDBDate 
eBl2seq 
eNumSubjects 
eSubjectsLength 
eNumQueries 
eTotalQueryLength 
eEvalueThreshold 
eNumThreads 
eHitListSize 
eOutputFmt 
eTaxIdList 
eNegTaxIdList 
eGIList 
eNegGIList 
eSeqIdList 
eNegSeqIdList 
eIPGList 
eNegIPGList 
eMaskAlgo 
eCompBasedStats 
eRange 
eMTMode 
eNumQueryBatches 
eNumErrStatus 
ePSSMInput 
eConverged 
eArchiveInput 
eRIDInput 
eDBInfo 
eDBTaxInfo 
eDBEntry 
eDBDumpAll 
eDBType 
eInputType 
eParseSeqIDs 
eSeqType 
eDBTest 
eDBAliasMode 
eDocker 
eGCP 
eAWS 
eELBJobId 
eELBBatchNum 
eSRA 
eELBVersion 

Definition at line 47 of file blast_usage_report.hpp.

Constructor & Destructor Documentation

◆ CBlastUsageReport()

CBlastUsageReport::CBlastUsageReport ( )

◆ ~CBlastUsageReport()

CBlastUsageReport::~CBlastUsageReport ( )

Member Function Documentation

◆ AddParam() [1/5]

void CBlastUsageReport::AddParam ( EUsageParams  p,
bool  val 
)

◆ AddParam() [2/5]

void CBlastUsageReport::AddParam ( EUsageParams  p,
const double &  val 
)

◆ AddParam() [3/5]

void CBlastUsageReport::AddParam ( EUsageParams  p,
const string val 
)

◆ AddParam() [4/5]

void CBlastUsageReport::AddParam ( EUsageParams  p,
int  val 
)

Definition at line 171 of file blast_usage_report.cpp.

References CUsageReportParameters::Add(), NStr::IntToString(), CUsageReport::IsEnabled(), m_Params, t, val, and x_EUsageParmsToString().

Referenced by BlastdbCopyApplication::BlastdbCopyApplication(), BOOST_AUTO_TEST_CASE(), CBlastDBAliasApp::CBlastDBAliasApp(), CBlastDbCheckApplication::CBlastDbCheckApplication(), CBlastDBCmdApp::CBlastDBCmdApp(), CBlastdbConvertApp::CBlastdbConvertApp(), CBlastFormatterApp::CBlastFormatterApp(), CBlastFormatterVdbApp::CBlastFormatterVdbApp(), CBlastnApp::CBlastnApp(), CBlastpApp::CBlastpApp(), CBlastUsageReport(), CBlastVdbCmdApp::CBlastVdbCmdApp(), CBlastxApp::CBlastxApp(), CConvert2BlastMaskApplication::CConvert2BlastMaskApplication(), CDeltaBlastApp::CDeltaBlastApp(), CMagicBlastApp::CMagicBlastApp(), CMakeBlastDBApp::CMakeBlastDBApp(), CMakeClusterDBApp::CMakeClusterDBApp(), CMakeProfileDBApp::CMakeProfileDBApp(), CPsiBlastApp::CPsiBlastApp(), CRPSBlastApp::CRPSBlastApp(), CRPSTBlastnApp::CRPSTBlastnApp(), CTblastnApp::CTblastnApp(), CTblastxApp::CTblastxApp(), CVDBBlastnApp::CVDBBlastnApp(), CVDBTblastnApp::CVDBTblastnApp(), CPsiBlastApp::DoIterations(), CIgBlastnApp::Init(), CIgBlastpApp::Init(), CBlastFormat::LogBlastSearchInfo(), LogQueryInfo(), CBlastFormatterApp::Run(), CBlastnApp::Run(), CBlastpApp::Run(), CBlastxApp::Run(), CDeltaBlastApp::Run(), CPsiBlastApp::Run(), CRPSBlastApp::Run(), CRPSTBlastnApp::Run(), CTblastnApp::Run(), CTblastxApp::Run(), CBlastDBAliasApp::Run(), CMakeBlastDBApp::Run(), CMakeClusterDBApp::Run(), CMakeProfileDBApp::Run(), CBlastFormatterVdbApp::Run(), CBlastVdbCmdApp::Run(), CIgBlastnApp::Run(), CIgBlastpApp::Run(), CMagicBlastApp::Run(), CConvert2BlastMaskApplication::Run(), CVDBBlastnApp::Run(), CVDBTblastnApp::Run(), CBlastFormatterApp::x_AddCmdOptions(), CBlastDBAliasApp::x_AddCmdOptions(), CBlastDBCmdApp::x_AddCmdOptions(), CConvert2BlastMaskApplication::x_AddCmdOptions(), CMakeBlastDBApp::x_AddCmdOptions(), CMakeClusterDBApp::x_AddCmdOptions(), CBlastFormatterVdbApp::x_AddCmdOptions(), CBlastVdbCmdApp::x_AddCmdOptions(), CMakeProfileDBApp::x_AddCmdOptions(), x_CheckRunEnv(), CMagicBlastApp::x_LogBlastSearchInfo(), CBlastnApp::x_RunMTBySplitDB(), CBlastpApp::x_RunMTBySplitDB(), CBlastxApp::x_RunMTBySplitDB(), CRPSBlastApp::x_RunMTBySplitDB(), CRPSTBlastnApp::x_RunMTBySplitDB(), CTblastnApp::x_RunMTBySplitDB(), CBlastnApp::x_RunMTBySplitQuery(), CBlastpApp::x_RunMTBySplitQuery(), CBlastxApp::x_RunMTBySplitQuery(), CRPSBlastApp::x_RunMTBySplitQuery(), CRPSTBlastnApp::x_RunMTBySplitQuery(), CTblastnApp::x_RunMTBySplitQuery(), BlastdbCopyApplication::~BlastdbCopyApplication(), CBlastDBAliasApp::~CBlastDBAliasApp(), CBlastDbCheckApplication::~CBlastDbCheckApplication(), CBlastDBCmdApp::~CBlastDBCmdApp(), CBlastdbConvertApp::~CBlastdbConvertApp(), CBlastFormatterApp::~CBlastFormatterApp(), CBlastFormatterVdbApp::~CBlastFormatterVdbApp(), CBlastnApp::~CBlastnApp(), CBlastpApp::~CBlastpApp(), CBlastVdbCmdApp::~CBlastVdbCmdApp(), CBlastxApp::~CBlastxApp(), CConvert2BlastMaskApplication::~CConvert2BlastMaskApplication(), CDeltaBlastApp::~CDeltaBlastApp(), CMagicBlastApp::~CMagicBlastApp(), CMakeBlastDBApp::~CMakeBlastDBApp(), CMakeClusterDBApp::~CMakeClusterDBApp(), CMakeProfileDBApp::~CMakeProfileDBApp(), CPsiBlastApp::~CPsiBlastApp(), CRPSBlastApp::~CRPSBlastApp(), CRPSTBlastnApp::~CRPSTBlastnApp(), CTblastnApp::~CTblastnApp(), CTblastxApp::~CTblastxApp(), CVDBBlastnApp::~CVDBBlastnApp(), and CVDBTblastnApp::~CVDBTblastnApp().

◆ AddParam() [5/5]

void CBlastUsageReport::AddParam ( EUsageParams  p,
Int8  val 
)

◆ x_CheckBlastUsageEnv()

void CBlastUsageReport::x_CheckBlastUsageEnv ( )
private

◆ x_CheckRunEnv()

void CBlastUsageReport::x_CheckRunEnv ( )
private

◆ x_EUsageParmsToString()

string CBlastUsageReport::x_EUsageParmsToString ( EUsageParams  p)
private

Member Data Documentation

◆ kNumRetries

const int CBlastUsageReport::kNumRetries =0
static

Definition at line 104 of file blast_usage_report.hpp.

Referenced by CBlastUsageReport().

◆ kTimeout

const int CBlastUsageReport::kTimeout =10
static

Definition at line 105 of file blast_usage_report.hpp.

Referenced by CBlastUsageReport().

◆ m_Params

CUsageReportParameters CBlastUsageReport::m_Params
private

Definition at line 119 of file blast_usage_report.hpp.

Referenced by AddParam(), and ~CBlastUsageReport().


The documentation for this class was generated from the following files:
Modified on Sat May 25 14:17:49 2024 by modify_doxy.py rev. 669887