Counter-based timers
Implement a Gaudi::Timer
class that accumulates its statistics in a
Counter
based on the ideas from @graven outlined in !762 (comment 1850572).
-
GenericTimer
is a generic timer that can be templated with astd::chrono
-compatible clock and a precision. A timing measurement is done via the RAII helper classScopeTimer
. - The Timer can register itself with an owner using the dedicated constructor.
-
RdtscClock
is a (non-walltime) clock based onrdtsc
. Depending on the available CPU this can be significantly faster than the default clock. Run thetest_GaudiTimer
unit tests for a measurement of the overhead of the various clocks. -
Gaudi/Timers.h
provides a defaultGaudi::Timer
based on wall-clock andGaudi::FastTimer
based on theRdtscClock
.
Next steps:
- follow-up on a "Counter service" (issue #51) that can then serve as a replacement for the ChronoStatSvc
- add an instance of
Gaudi::Timer
to the defaultAlgorithm
base-class