The Gaudi Framework
v30r3 (a5ef0a68)
|
Auxiliary class. More...
#include <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 20 of file TimerForSequencer.h.
|
inline |
Constructor.
Specify the name, for later printing.
Definition at line 25 of file TimerForSequencer.h.
|
default |
|
inline |
|
inline |
|
inline |
Write measured time into the message stream.
Definition at line 35 of file TimerForSequencer.cpp.
|
static |
header matching the previous format
Definition at line 61 of file TimerForSequencer.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
Start a time measurement.
Definition at line 33 of file TimerForSequencer.h.
uint64_t TimerForSequencer::stop | ( | ) |
Stop time measurement and return the last elapsed time.
Definition at line 10 of file TimerForSequencer.cpp.
|
private |
Definition at line 71 of file TimerForSequencer.h.
|
private |
Definition at line 77 of file TimerForSequencer.h.
|
private |
Definition at line 76 of file TimerForSequencer.h.
|
private |
Definition at line 79 of file TimerForSequencer.h.
|
private |
Definition at line 78 of file TimerForSequencer.h.
|
private |
Definition at line 69 of file TimerForSequencer.h.
|
private |
Definition at line 75 of file TimerForSequencer.h.
|
private |
Definition at line 70 of file TimerForSequencer.h.
|
private |
Definition at line 72 of file TimerForSequencer.h.
|
private |
Definition at line 73 of file TimerForSequencer.h.
|
private |
Definition at line 80 of file TimerForSequencer.h.
|
private |
Definition at line 81 of file TimerForSequencer.h.
|
private |
Definition at line 82 of file TimerForSequencer.h.