bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
BESStopWatch Class Reference
Inheritance diagram for BESStopWatch:
Inheritance graph
Collaboration diagram for BESStopWatch:
Collaboration graph

Public Member Functions

 BESStopWatch ()=default
 Makes a new BESStopWatch with a logName of TIMING_LOG_KEY.
 
 BESStopWatch (const BESStopWatch &copy_from)=default
 
 BESStopWatch (const std::string &logName)
 
void dump (std::ostream &strm) const override
 dumps information about this object
 
BESStopWatchoperator= (const BESStopWatch &copy_from)=default
 
virtual bool start (const std::string &name, BESDataHandlerInterface *dhi)
 
virtual bool start (const std::string &name, const std::string &reqID={BESLog::TheLog() ->get_request_id()})
 
 ~BESStopWatch () override
 

Detailed Description

Definition at line 100 of file BESStopWatch.h.

Constructor & Destructor Documentation

◆ BESStopWatch() [1/2]

BESStopWatch::BESStopWatch ( )
default

Makes a new BESStopWatch with a logName of TIMING_LOG_KEY.

◆ BESStopWatch() [2/2]

BESStopWatch::BESStopWatch ( const std::string & logName)
inlineexplicit

Makes a new BESStopWatch.

Parameters
logNameThe name of the log to use in the logging output.

Definition at line 127 of file BESStopWatch.h.

◆ ~BESStopWatch()

BESStopWatch::~BESStopWatch ( )
override

This destructor is "special" in that it's execution signals the timer to stop if it has been started. Stopping the timer will initiate an attempt to write logging information to the BESDebug::GetStrm() stream. If the start method has not been called then the method exits silently.

Definition at line 145 of file BESStopWatch.cc.

Member Function Documentation

◆ dump()

void BESStopWatch::dump ( std::ostream & strm) const
overridevirtual

dumps information about this object

Displays the pointer value of this instance

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 194 of file BESStopWatch.cc.

◆ start() [1/2]

bool BESStopWatch::start ( const std::string & name,
BESDataHandlerInterface * dhi )
virtual

Starts the timer. NB: This method will attempt to write logging information to the BESDebug::GetStrm() stream.

Parameters
nameThe name of the timer.
dhiThe DataHandlerInterface object. Used to retrieve the request ID. If the dhi returns an empty string for the request id then it's retrieved using BESLog::get_request_id().

Starts the timer. NB: This method will attempt to write logging information to the BESDebug::GetStrm() stream.

Parameters
nameThe name of the timer.
dhiThe name of the timer.

Definition at line 69 of file BESStopWatch.cc.

◆ start() [2/2]

bool BESStopWatch::start ( const std::string & name,
const std::string & reqID = {BESLog::TheLog()->get_request_id()} )
virtual

Starts the timer. NB: This method will attempt to write logging information to the BESDebug::GetStrm() stream.

Parameters
nameThe name of the timer.
nameA name for the timer (often it's the value of the "prolog" macro)
reqIDThe client's request ID associated with this activity. If not specified the values is retrieved from BESLog::get_request_id().

Starts the timer. NB: This method will attempt to write logging information to the BESDebug::GetStrm() stream.

Parameters
nameThe name of the timer.
reqIDThe client's request ID associated with this activity. If reqID is not provided then the value of BESLog::get_request_id() \ is utilized (see declaration in BESStopWatch.h)

Definition at line 102 of file BESStopWatch.cc.


The documentation for this class was generated from the following files: