![]() |
The Gaudi Framework
v38r1p1 (ae26267b)
|
Auxiliary class. More...
#include </builds/gaudi/Gaudi/GaudiAlg/src/components/TimerForSequencer.h>
Public Member Functions | |
TimerForSequencer (std::string name, unsigned int size, double factor) | |
Constructor. More... | |
~TimerForSequencer ()=default | |
void | start () |
Start a time measurement. More... | |
uint64_t | stop () |
Stop time measurement and return the last elapsed time. More... | |
const std::string & | name () const |
returns the name More... | |
double | lastTime () const |
returns the last measured time More... | |
double | lastCpu () const |
returns the last measured time More... | |
double | elapsedTotal () const |
returns the total elapsed time More... | |
double | cpuTotal () const |
returns the toptal cpu time More... | |
uint64_t | count () const |
Returns the number run count. More... | |
MsgStream & | fillStream (MsgStream &s) const |
Write measured time into the message stream. More... | |
Static Public Member Functions | |
static std::string | header (std::string::size_type size) |
header matching the previous format More... | |
Private Attributes | |
std::string | m_name |
unsigned int | m_size |
double | m_factor |
uint64_t | m_startClock = 0ULL |
uint64_t | m_startCpu = 0ULL |
uint64_t | m_num = 0ULL |
uint64_t | m_lastTime = 0ULL |
uint64_t | m_lastCpu = 0ULL |
uint64_t | m_min = 0ULL |
uint64_t | m_max = 0ULL |
uint64_t | m_sum = 0ULL |
uint64_t | m_sum2 = 0ULL |
uint64_t | m_sumCpu = 0ULL |
Auxiliary class.
Measure the time between start and stop, and compute average, min and max. In fact, measure the cpu time, and the elapsed time but gives min/max only for elapsed.
Avoid usage of double precision floating point to cumulate counts and use unsigned long long integers instead. The total capacity is enough (~1.8e19) and there is no risk to loose counts when the available sum is big with respect to the added duration. The sigma
Definition at line 30 of file TimerForSequencer.h.
|
inline |
|
default |
|
inline |
|
inline |
returns the toptal cpu time
Definition at line 63 of file TimerForSequencer.h.
|
inline |
returns the total elapsed time
Definition at line 60 of file TimerForSequencer.h.
Write measured time into the message stream.
Definition at line 44 of file TimerForSequencer.cpp.
|
static |
|
inline |
returns the last measured time
Definition at line 57 of file TimerForSequencer.h.
|
inline |
|
inline |
|
inline |
uint64_t TimerForSequencer::stop | ( | ) |
Stop time measurement and return the last elapsed time.
Definition at line 20 of file TimerForSequencer.cpp.
|
private |
Definition at line 77 of file TimerForSequencer.h.
|
private |
Definition at line 83 of file TimerForSequencer.h.
|
private |
Definition at line 82 of file TimerForSequencer.h.
|
private |
Definition at line 85 of file TimerForSequencer.h.
|
private |
Definition at line 84 of file TimerForSequencer.h.
|
private |
Definition at line 75 of file TimerForSequencer.h.
|
private |
Definition at line 81 of file TimerForSequencer.h.
|
private |
Definition at line 76 of file TimerForSequencer.h.
|
private |
Definition at line 78 of file TimerForSequencer.h.
|
private |
Definition at line 79 of file TimerForSequencer.h.
|
private |
Definition at line 86 of file TimerForSequencer.h.
|
private |
Definition at line 87 of file TimerForSequencer.h.
|
private |
Definition at line 88 of file TimerForSequencer.h.