#include <TimerStack.h>
Classes | |
class | Timer |
TTimer is a container for a timer name and associated timers (TimeReport::Item's) More... | |
Public Types | |
enum | Status { AlwaysActive, Disableable } |
enum | Type { DetailedMonitoring, FastMonitoring } |
Public Member Functions | |
void | benchmark (std::string name, int n=1000000) |
measure time to perform a number of floating point multiplications (FLOPs) More... | |
void | clear_stack () |
stop all timers in the stack and clear it. More... | |
PentiumTimeType | pentiumTime () |
get access to the cpu clock counter on Intel and AMD cpus More... | |
void | pop () |
stop the last timer and remove it from the stack More... | |
void | pop_and_push (std::string name, Type type=FastMonitoring) |
void | pop_and_push (Timer &, Type type=FastMonitoring) |
void | push (std::string name, Type type=FastMonitoring) |
start a timer and add it to the stack More... | |
void | push (Timer &, Type type=FastMonitoring) |
TimerStack () | |
TimerStack (Status status) | |
~TimerStack () | |
Private Attributes | |
std::stack< TimeMe * > | stack |
Status | status_ |
Definition at line 19 of file TimerStack.h.
enum TimerStack::Status |
Enumerator | |
---|---|
AlwaysActive | |
Disableable |
Definition at line 35 of file TimerStack.h.
enum TimerStack::Type |
Types of time interval measurements used in TimeReport:
Enumerator | |
---|---|
DetailedMonitoring | |
FastMonitoring |
Definition at line 34 of file TimerStack.h.
|
inline |
Definition at line 53 of file TimerStack.h.
|
inline |
Definition at line 54 of file TimerStack.h.
|
inline |
Definition at line 56 of file TimerStack.h.
References clear_stack().
void TimerStack::benchmark | ( | std::string | name, |
int | n = 1000000 |
||
) |
measure time to perform a number of floating point multiplications (FLOPs)
Definition at line 38 of file TimerStack.cc.
References a, b, FastMonitoring, i, n, pop(), and push().
void TimerStack::clear_stack | ( | ) |
stop all timers in the stack and clear it.
Definition at line 25 of file TimerStack.cc.
Referenced by ~TimerStack().
|
inline |
get access to the cpu clock counter on Intel and AMD cpus
Definition at line 75 of file TimerStack.h.
void TimerStack::pop | ( | ) |
stop the last timer and remove it from the stack
Definition at line 18 of file TimerStack.cc.
References stack.
Referenced by benchmark(), clear_stack(), and pop_and_push().
void TimerStack::pop_and_push | ( | std::string | name, |
Type | type = FastMonitoring |
||
) |
stop the last timer and remove it from the stack, than start a new timer and add it to the stack (convinient way of timing sequential code fragments)
Definition at line 29 of file TimerStack.cc.
void TimerStack::pop_and_push | ( | TimerStack::Timer & | timer, |
Type | type = FastMonitoring |
||
) |
Definition at line 33 of file TimerStack.cc.
void TimerStack::push | ( | std::string | name, |
Type | type = FastMonitoring |
||
) |
start a timer and add it to the stack
Definition at line 2 of file TimerStack.cc.
References TimingReport::current(), DetailedMonitoring, mergeVDriftHistosByStation::name, and stack.
Referenced by benchmark(), and pop_and_push().
void TimerStack::push | ( | TimerStack::Timer & | timer, |
Type | type = FastMonitoring |
||
) |
Definition at line 10 of file TimerStack.cc.
References TimingReport::Item::counter, DetailedMonitoring, TimerStack::Timer::first(), TimerStack::Timer::main(), and stack.
|
private |
Definition at line 78 of file TimerStack.h.
Referenced by clear_stack(), pop(), and push().
|
private |
Definition at line 79 of file TimerStack.h.