Class Timer implements a diagnostic timer and timer container for the collection and display of execution times.
More...
#include <Timer.hpp>
Class Timer implements a diagnostic timer and timer container for the collection and display of execution times.
Definition at line 185 of file Timer.hpp.
stk_classic::diag::Timer::Timer |
( |
const std::string & |
name, |
|
|
const Timer |
parent |
|
) |
| |
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 727 of file Timer.cpp.
stk_classic::diag::Timer::Timer |
( |
const std::string & |
name, |
|
|
const Timer |
parent, |
|
|
const TimerSet & |
timer_set |
|
) |
| |
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 735 of file Timer.cpp.
stk_classic::diag::Timer::Timer |
( |
const std::string & |
name, |
|
|
TimerMask |
timer_mask, |
|
|
const Timer |
parent |
|
) |
| |
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 731 of file Timer.cpp.
stk_classic::diag::Timer::Timer |
( |
const std::string & |
name, |
|
|
TimerMask |
timer_mask, |
|
|
const Timer |
parent, |
|
|
const TimerSet & |
timer_set |
|
) |
| |
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 739 of file Timer.cpp.
stk_classic::diag::Timer::Timer |
( |
TimerImpl & |
timer_impl | ) |
|
|
inlineexplicit |
const std::string & stk_classic::diag::Timer::getName |
( |
| ) |
const |
Member function getName returns the name of the timer.
- Returns
- a std::string const reference to the timer's name.
Definition at line 745 of file Timer.cpp.
const TimerSet & stk_classic::diag::Timer::getTimerSet |
( |
| ) |
const |
Member function getTimerMask returns the timer mask of the timer.
- Returns
- a TimerMask value to the timer mask.
Definition at line 755 of file Timer.cpp.
TimerMask stk_classic::diag::Timer::getTimerMask |
( |
| ) |
const |
Member function getTimerMask returns the timer mask of the timer.
- Returns
- a TimerMask value to the timer mask.
Definition at line 750 of file Timer.cpp.
double stk_classic::diag::Timer::getSubtimerLapCount |
( |
| ) |
const |
Member function getSubtimerLapCount returns the subtimer lap counter.
- Returns
- a Counter value of the subtimer lap counter.
Definition at line 760 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 771 of file Timer.cpp.
double stk_classic::diag::Timer::accumulateSubtimerLapCounts |
( |
| ) |
const |
Member function accumulateSubtimerLapCounts accumulates the subtimer la counts.
- Returns
- an int value of the count.
Definition at line 814 of file Timer.cpp.
Timer & stk_classic::diag::Timer::start |
( |
| ) |
|
Member function start starts the lap timer.
- Returns
- a Timer reference to this timer.
Definition at line 819 of file Timer.cpp.
Timer & stk_classic::diag::Timer::lap |
( |
| ) |
|
Member function lap sets the lap stop time.
- Returns
- a Timer reference to the timer.
Definition at line 825 of file Timer.cpp.
Timer & stk_classic::diag::Timer::stop |
( |
| ) |
|
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 831 of file Timer.cpp.
void stk_classic::diag::Timer::checkpoint |
( |
| ) |
const |
Member function checkpoint checkpoints the metrics by storing the total time in the checkpoint value.
Definition at line 837 of file Timer.cpp.
Writer & stk_classic::diag::Timer::dump |
( |
Writer & |
dout | ) |
const |
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 842 of file Timer.cpp.
void updateRootTimer |
( |
Timer |
| ) |
|
|
friend |
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 394 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 402 of file Timer.cpp.
void deleteRootTimer |
( |
Timer |
| ) |
|
|
friend |
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 411 of file Timer.cpp.
std::vector<Timer>& findTimers |
( |
Timer |
, |
|
|
const std::string & |
, |
|
|
std::vector< Timer > & |
|
|
) |
| |
|
friend |
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 420 of file Timer.cpp.
The documentation for this class was generated from the following files: