Class Timer implements a diagnostic timer and timer container for the collection and display of execution times.
More...
#include <Timer.hpp>
List of all members.
Classes |
| struct | Metric |
Public Member Functions |
| | Timer (const std::string &name, const Timer parent) |
| | Timer (const std::string &name, const Timer parent, const TimerSet &timer_set) |
| | Timer (const std::string &name, TimerMask timer_mask, const Timer parent) |
| | Timer (const std::string &name, TimerMask timer_mask, const Timer parent, const TimerSet &timer_set) |
| | Timer (TimerImpl &timer_impl) |
|
| Timer (TimerImpl *timer_impl) |
|
| Timer (const Timer &timer) |
|
Timer & | operator= (const Timer &timer) |
|
const TimerList & | getTimerList () const |
|
TimerList::iterator | begin () |
|
TimerList::const_iterator | begin () const |
|
TimerList::iterator | end () |
|
TimerList::const_iterator | end () const |
| const std::string & | getName () const |
| const TimerSet & | getTimerSet () const |
| TimerMask | getTimerMask () const |
|
bool | shouldRecord () const |
| double | getSubtimerLapCount () const |
| template<class T > |
| const Metric< T > & | getMetric () const |
| double | accumulateSubtimerLapCounts () const |
| Timer & | start () |
| Timer & | lap () |
| Timer & | stop () |
| void | checkpoint () const |
| Writer & | dump (Writer &dout) const |
Friends |
|
class | TimerImpl |
|
class | TimeBlock |
|
class | TimeBlockSynchronized |
| void | updateRootTimer (Timer) |
| Timer | createRootTimer (const std::string &, const TimerSet &) |
| void | deleteRootTimer (Timer) |
| std::vector< Timer > & | findTimers (Timer, const std::string &, std::vector< Timer > &) |
| | Member function findTimer return a vector of timers whose tail of the dot separated name from root_time to leaf matches the specified path_tail.
|
Detailed Description
Class Timer implements a diagnostic timer and timer container for the collection and display of execution times.
Definition at line 175 of file Timer.hpp.
Constructor & Destructor Documentation
Creates a new Timer instance.
- Parameters:
-
| name | a std::string const reference to the name of the timer. |
| parent | a Timer value of the parent timer. |
Definition at line 697 of file Timer.cpp.
Creates a new Timer instance.
- Parameters:
-
| name | a std::string const reference to the name of the timer. |
| parent | a Timer value of the parent timer. |
| timer_set | a TimerSet value of the timer set used to interpret the TimerMask's of this and children timers. |
Definition at line 705 of file Timer.cpp.
Creates a new Timer instance.
- Parameters:
-
| name | a std::string const reference to the name of the timer. |
| timer_mask | a TimerMask value which enables this timer. |
| parent | a Timer value of the parent timer. |
Definition at line 701 of file Timer.cpp.
Creates a new Timer instance.
- Parameters:
-
| name | a std::string const reference to the name of the timer. |
| timer_mask | a TimerMask value which enables this timer. |
| parent | a Timer value of the parent timer. |
| timer_set | a TimerSet value of the timer set used to interpret the TimerMask's of this and children timers. |
Definition at line 709 of file Timer.cpp.
Member Function Documentation
Member function getName returns the name of the timer.
- Returns:
- a std::string const reference to the timer's name.
Definition at line 715 of file Timer.cpp.
Member function getTimerMask returns the timer mask of the timer.
- Returns:
- a TimerMask value to the timer mask.
Definition at line 725 of file Timer.cpp.
Member function getTimerMask returns the timer mask of the timer.
- Returns:
- a TimerMask value to the timer mask.
Definition at line 720 of file Timer.cpp.
Member function getSubtimerLapCount returns the subtimer lap counter.
- Returns:
- a Counter value of the subtimer lap counter.
Definition at line 730 of file Timer.cpp.
Member function getLapCount returns the lap counter metric. The lap count metric is the number of times the stop function has been executed.
- Returns:
- a CounterMetric const reference of the lap counter metric.
Definition at line 741 of file Timer.cpp.
Member function accumulateSubtimerLapCounts accumulates the subtimer la counts.
- Returns:
- an int value of the count.
Definition at line 784 of file Timer.cpp.
Member function start starts the lap timer.
- Returns:
- a Timer reference to this timer.
Definition at line 789 of file Timer.cpp.
Member function lap sets the lap stop time.
- Returns:
- a Timer reference to the timer.
Definition at line 795 of file Timer.cpp.
Member function stop sets the lap stop time and sums the just completed lap time to the timer.
- Returns:
- a Timer reference to the timer.
Definition at line 801 of file Timer.cpp.
Member function checkpoint checkpoints the metrics by storing the total time in the checkpoint value.
Definition at line 807 of file Timer.cpp.
Member function dump writes the timer to the specified diagnostic writer.
- Parameters:
-
| dout | a Writer variable reference to write the timer to. |
- Returns:
- a Writer reference to dout.
Definition at line 812 of file Timer.cpp.
Friends And Related Function Documentation
Function updateRootTimer updates the root timers stop and total metric values with the current time.
- Parameters:
-
| root_timer | a Timer reference to the root timer. |
Definition at line 364 of file Timer.cpp.
Function createRootTimer creates a root timer. Root timers are the root of a timer hierarchy. The timer_set specifies the timer groupings for this root timer. The percentage of a child timer is the ratio of that timer the its root.
- Parameters:
-
| name | a std::string const reference to the name of the new root timer. |
| timer_set | a TimerSet const reference of the timer set of the new root timer. |
- Returns:
- a Timer value of the new root timer.
Definition at line 372 of file Timer.cpp.
Function deleteRootTimer deletes a root timer and all of it's children timers. All children Timers are invalidated and can no longer be used.
- Parameters:
-
| a | Timer value of the root timer to delete. |
Definition at line 381 of file Timer.cpp.
Member function findTimer return a vector of timers whose tail of the dot separated name from root_time to leaf matches the specified path_tail.
- Parameters:
-
| root_timer | a Timer value of the root to begin search. |
| path_tail | a std::string const reference to the dot separated tail to match. |
| found_timer | a std::vector<Timer> reference to the vector to store matching timers. |
- Returns:
- a
std::vector<Timer> reference to found_timer.
Definition at line 390 of file Timer.cpp.
The documentation for this class was generated from the following files: