cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
TimeKeeper Class Reference

Collection of clocks to benchmark execution blocks. More...

#include <CepGen/Utils/TimeKeeper.h>

Classes

class  Ticker
 Scoped timekeeping utility. More...
 

Public Member Functions

 TimeKeeper ()=default
 
void clear ()
 Reset all counters and the timer.
 
bool empty () const
 Check if at least one monitor recorded something.
 
std::string summary () const
 Write a summary of all monitors.
 
TimeKeepertick (const std::string &func, double time=-1.)
 Count the time for one monitor.
 
const Timertimer () const
 Local timer object.
 

Detailed Description

Definition at line 35 of file TimeKeeper.h.

Constructor & Destructor Documentation

◆ TimeKeeper()

TimeKeeper ( )
explicitdefault

Member Function Documentation

◆ clear()

void clear ( )

Definition at line 27 of file TimeKeeper.cpp.

◆ empty()

bool empty ( ) const

Definition at line 40 of file TimeKeeper.h.

◆ summary()

std::string summary ( ) const

Definition at line 37 of file TimeKeeper.cpp.

◆ tick()

TimeKeeper & tick ( const std::string &  func,
double  time = -1. 
)
Parameters
[in]funcmonitor to increment
[in]timeincrement, in second (< 0 to count since last timer reset)

Definition at line 32 of file TimeKeeper.cpp.

◆ timer()

const Timer & timer ( ) const