A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/perf__log_8hpp_source.html below:

NCBI C++ ToolKit: include/corelib/perf_log.hpp Source File

1 #ifndef CORELIB___PERF_LOG__HPP 2 #define CORELIB___PERF_LOG__HPP 117  void

Suspend(

void

);

140  void

Discard(

void

);

149  static bool

IsON(

void

);

152  static void

SetON(

bool

enable =

true

);

169  double

GetElapsedTime(

void

)

const

;

172  bool

x_CheckValidity(

const CTempString

& err_msg)

const

;

213 #define PERF_POST(perf_logger, status, resource, args) \ 214  do { if ( CPerfLogger::IsON() ) \ 215  perf_logger.Post(CRequestStatus::status, resource) args; \ 232 #define PERF_POST_DB(perf_logger, status, resource, server, args) \ 233  do { if ( CPerfLogger::IsON() ) \ 234  perf_logger.Post(CRequestStatus::status, resource) \ 235  .Print("dbserver"

, server) args; \

303  void

Suspend(

void

);

318  void

Post(

int

status,

324  void

Discard(

void

);

440  return Post

((

int

)status, resource, status_msg);

488  "CPerfLogger is already discarded"

);

501

: m_Logger(

state

), m_Resource(resource)

503  if

( resource.

empty

() ) {

505  "CPerfLogGuard:: resource name is not specified"

);

517  if

( resource.

empty

() ) {

519  "CPerfLogGuard:: resource name is not specified"

);

528

: m_Logger(stopwatch,

state

), m_Resource(resource)

530  if

( resource.

empty

() ) {

532  "CPerfLogGuard:: resource name is not specified"

);

569  "CPerfLogGuard is already discarded"

);

581  return Post

((

int

)status, status_msg);

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

bool x_CheckValidity(const CTempString &err_msg) const

void Post(CRequestStatus::ECode status, CTempString status_msg=CTempString())

Write the collected resource info and timing to the log.

#define ERR_POST_ONCE(message)

Error posting only once during program execution.

EStart

If to start the timing immediately.

CDiagContext_Extra Post(CRequestStatus::ECode status, CTempString resource, CTempString status_msg=CTempString())

Log the timing; stop and deactivate the timer.

~CPerfLogger()

If the timer is still active, then post an error (once).

double GetElapsedTime(void) const

Get total elapsed time (including any adjustments) in seconds.

CPerfLogGuard(CTempString resource, CPerfLogger::EStart state=CPerfLogger::eStart)

Constructor.

void Discard(void)

Discard the results.

CPerfLogger & GetLogger(void)

Access logger directly.

void Discard(void)

Discard the timing results; stop and deactivate the timer.

SDiagMessage::TExtraArgs m_Parameters

list< TExtraArg > TExtraArgs

const CTime & GetLoggerStartTime(void) const

Get the logger's start time.

CPerfLogger(EStart state=eStart)

Constructor. Starts the timer by default.

void Adjust(CTimeSpan timespan)

Adjust the printed elapsed time.

pair< string, string > TExtraArg

static bool IsON(void)

Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging",...

~CPerfLogGuard()

If Post() or Discard() have not been called, then log the collected info with status 500.

CStopWatch::EStart m_TimerState

void Suspend(void)

Suspend the timer.

CPerfLogGuard & AddParameter(CTempString name, CTempString value)

Add info to the resource's description.

void Suspend(void)

Suspend the timer.

void Start(void)

Activate and start (or, restart after Suspend()) the timer.

void Start(void)

Activate and start (or, restart after Suspend()) the timer.

@ eStart

Call Start() immediately after creating.

@ e500_InternalServerError

void Error(CExceptionArgs_Base &args)

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

bool empty(void) const

Return true if the represented string is empty (i.e., the length is zero)

double Elapsed(void) const

Return time elapsed since first Start() or last Restart() call (in seconds).

void Stop(void)

Suspend the timer.

double GetAsDouble(void) const

Return time span as number of seconds.

bool IsEmpty(void) const

Is time object empty (date and time)?

EStart

Defines how to create new timer.

CTimeSpan DiffTimeSpan(const CTime &t) const

Difference in nanoseconds from specified time.

void Start(void)

Start the timer.

CTime GetFastLocalTime(void)

Quick and dirty getter of local time.

@ eStart

Start timer immediately after creating.

@ eStop

Do not start timer, just create it.

#define NCBI_XNCBI_EXPORT

const GenericPointer< typename T::ValueType > T2 value

Defines NCBI C++ diagnostic APIs, classes, and macros.

Defines: CTimeFormat - storage class for time format.

Defines CRequestStatus class for NCBI C++ diagnostic API.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4