![]() |
The Gaudi Framework
v38r3 (c3fc9673)
|
A generic timer based on std::chrono and Gaudi::Accumulators. More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Timers/GenericTimer.h>

Classes | |
| class | ScopeTimer |
| A scoped timer that starts/stops on con/de-struction. More... | |
Public Types | |
| typedef Gaudi::Accumulators::StatCounter< Unit > | Stats_t |
| Type of Counter used for accumulating time measurements. More... | |
Public Member Functions | |
| GenericTimer ()=default | |
| Default constructor. More... | |
| template<class OWNER > | |
| GenericTimer (OWNER *o, const std::string &name) | |
| Constructor attaching the statistics counter to an owner. More... | |
| GenericTimer (const GenericTimer &)=delete | |
| No copy. More... | |
| auto | operator() () const |
| Create (and start) a ScopeTimer. More... | |
| const Stats_t & | stats () const |
| Return accumulated timing statistics. More... | |
Private Attributes | |
| Stats_t | m_stats |
| statistics counter More... | |
A generic timer based on std::chrono and Gaudi::Accumulators.
The timer is templated with a std::chrono compatible clock and the Unit of precision (ms, us, ...). It accumulates all time measurements in a Gaudi::Accumulators::StatCounter. A time measurement is done via the RAII helper class created by calling operator().
Usually one would use one of the predefined Timer types from Gaudi/Timers.h:
Definition at line 43 of file GenericTimer.h.
| typedef Gaudi::Accumulators::StatCounter<Unit> Gaudi::Timers::GenericTimer< Clock, Unit >::Stats_t |
Type of Counter used for accumulating time measurements.
Definition at line 46 of file GenericTimer.h.
|
default |
Default constructor.
|
inline |
Constructor attaching the statistics counter to an owner.
Definition at line 82 of file GenericTimer.h.
|
delete |
No copy.
|
inline |
|
inline |
|
mutableprivate |
statistics counter
Definition at line 96 of file GenericTimer.h.