TPerfLogging::GetDefault();
65TPerfLogging::SetDefault(enable);
84 if( resource.
empty() ) {
86 "CPerfLogger::Log: resource name is not specified");
89 if( !status_msg.
empty() ) {
99start.
AsString(
"Y-M-DTh:m:s.rZ")));
101elapsed < 0.0 ? 0.0 : elapsed, args);
118 "CPerfLogGuard is already discarded");
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CDiagContext_Extra & Print(const string &name, const string &value)
The method does not print the argument, but adds it to the string.
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.
CDiagContext & GetDiagContext(void)
Get diag context instance.
CDiagContext_Extra Post(CRequestStatus::ECode status, CTempString resource, CTempString status_msg=CTempString())
Log the timing; stop and deactivate the timer.
static void SetON(bool enable=true)
Turn performance logging on/off globally.
CDiagContext_Extra Extra(void) const
Create a temporary CDiagContext_Extra object.
void Discard(void)
Discard the results.
void Discard(void)
Discard the timing results; stop and deactivate the timer.
SDiagMessage::TExtraArgs m_Parameters
list< TExtraArg > TExtraArgs
pair< string, string > TExtraArg
static bool IsON(void)
Is performance logging on, globally? Controlled by CParam(section="Log", entry="PerfLogging",...
void Suspend(void)
Suspend the timer.
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.
@ eParam_NoThread
Do not use per-thread values.
#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).
string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const
Transform time to string.
bool IsEmpty(void) const
Is time object empty (date and time)?
CTime GetFastLocalTime(void)
Quick and dirty getter of local time.
CDiagContext_Extra g_PostPerf(int status, double timespan, SDiagMessage::TExtraArgs &args)
NCBI_PARAM_DECL(bool, Log, PerfLogging)
Turn on/off performance logging (globally)
NCBI_PARAM_DEF_EX(bool, Log, PerfLogging, false, eParam_NoThread, LOG_PERFLOGGING)
typedef NCBI_PARAM_TYPE(Log, PerfLogging) TPerfLogging
Defines NCBI C++ API for timing-and-logging, classes, and macros.
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