Timer info at a given level and all the children.
More...
#include <Teuchos_StackedTimer.hpp>
|
| void | splitString (const std::string &locate_name, std::string &first_name, std::string &second_name) |
| | split a string into two parts split by a '@' if no '@' first gets the full string More...
|
| |
Timer info at a given level and all the children.
This holds the timer info for the leaf node of a timer stack. It has both its timer info and all the sub leaves bellow it. You can start and stop sub timers, get sub info and dump out things to a ostream
Definition at line 181 of file Teuchos_StackedTimer.hpp.
◆ LevelTimer() [1/3]
| Teuchos::StackedTimer::LevelTimer::LevelTimer |
( |
| ) |
|
◆ LevelTimer() [2/3]
| Teuchos::StackedTimer::LevelTimer::LevelTimer |
( |
int |
level, |
|
|
const char * |
name = "RootTimer", |
|
|
LevelTimer * |
parent = NULL, |
|
|
bool |
start_timer = true |
|
) |
| |
|
inline |
Standard constructor
- Parameters
-
| [in] | level | Integer level of this timer |
| [in] | name | Name for this timer |
| [in] | parent | Parent of this timer |
| [in] | start | bool to start the timer on construction |
Definition at line 201 of file Teuchos_StackedTimer.hpp.
◆ LevelTimer() [3/3]
| Teuchos::StackedTimer::LevelTimer::LevelTimer |
( |
const LevelTimer & |
src | ) |
|
|
inline |
◆ start()
| LevelTimer* Teuchos::StackedTimer::LevelTimer::start |
( |
const char * |
sub_name | ) |
|
|
inline |
Start a sub timer of a given name, create if doesn't exist
- Parameters
-
| [in] | sub_name | Name of subtimer |
- Returns
- Pointer to the sub timer which was started
Definition at line 228 of file Teuchos_StackedTimer.hpp.
◆ stop()
| LevelTimer* Teuchos::StackedTimer::LevelTimer::stop |
( |
const std::string & |
name = "RootTimer" | ) |
|
|
inline |
Stop the current running timer. The timer name is required to verify that you are stopping the current running timer and will error out if the names don't match
- Parameters
-
| [in] | name | the name of the timer you want to stop, used for matching start only |
- Returns
- parent level timer
Definition at line 245 of file Teuchos_StackedTimer.hpp.
◆ get_full_name()
| std::string Teuchos::StackedTimer::LevelTimer::get_full_name |
( |
| ) |
|
|
inline |
Return the full name of the timer with each level split by :
- Returns
- The full name of the timer
Definition at line 257 of file Teuchos_StackedTimer.hpp.
◆ countTimers()
| int Teuchos::StackedTimer::LevelTimer::countTimers |
( |
| ) |
|
|
inline |
Return the number of timers on this level
- Returns
- the number of timers and sub timers
Definition at line 273 of file Teuchos_StackedTimer.hpp.
◆ accumulatedTime()
| double Teuchos::StackedTimer::LevelTimer::accumulatedTime |
( |
const std::string & |
locate_name = "" | ) |
|
|
inline |
Return the time spent at a given level
- Parameters
-
| [in] | locate_name | name of subtimer, if blank return current level time |
- Returns
- time in seconds at provided level
Definition at line 291 of file Teuchos_StackedTimer.hpp.
◆ splitString()
| void Teuchos::StackedTimer::LevelTimer::splitString |
( |
const std::string & |
locate_name, |
|
|
std::string & |
first_name, |
|
|
std::string & |
second_name |
|
) |
| |
|
inlineprotected |
split a string into two parts split by a '@' if no '@' first gets the full string
- Parameters
-
| [in] | locate_name | input string to split |
| [out] | first_name | Part of string before the first '@' |
| [out] | second_name | part of string after the first '@' |
Definition at line 319 of file Teuchos_StackedTimer.hpp.
◆ accumulatedTimePerUpdate()
| double Teuchos::StackedTimer::LevelTimer::accumulatedTimePerUpdate |
( |
const std::string & |
locate_name = "" | ) |
|
|
inline |
Return the time spent per update at a given level
- Parameters
-
| [in] | locate_name | name of subtimer, if blank return current level time |
- Returns
- time in seconds per update at provided level
Definition at line 336 of file Teuchos_StackedTimer.hpp.
◆ accumulatedTimePerTimerCall()
| double Teuchos::StackedTimer::LevelTimer::accumulatedTimePerTimerCall |
( |
const std::string & |
locate_name = "" | ) |
|
|
inline |
Return the time spent per timer start/stop pair at a given level
- Parameters
-
| [in] | locate_name | name of subtimer, if blank return current level time |
- Returns
- time in seconds per timer start/stop pair at provided level
Definition at line 355 of file Teuchos_StackedTimer.hpp.
◆ pack()
| void Teuchos::StackedTimer::LevelTimer::pack |
( |
| ) |
|
Pack up all the levels into a buffer and mpi send to rank 0
◆ unpack()
| LevelTimer* Teuchos::StackedTimer::LevelTimer::unpack |
( |
unsigned |
from | ) |
|
Unpack the level timer stack from a mpi recv
- Parameters
-
| [in] | from | rank you are sending from |
- Returns
- pointer to level timer unpacked
◆ report()
| void Teuchos::StackedTimer::LevelTimer::report |
( |
std::ostream & |
os | ) |
|
Dump the timer stats in a pretty format to ostream
- Parameters
-
| [in/out] | os Where are you dumping the stats, stdout?? |
Definition at line 22 of file Teuchos_StackedTimer.cpp.
◆ findTimer()
| BaseTimer::TimeInfo Teuchos::StackedTimer::LevelTimer::findTimer |
( |
const std::string & |
name, |
|
|
bool & |
found |
|
) |
| |
Return the time info for a given string
- Parameters
-
| name | input string to search for |
| set | to true on exit if timer was found |
- Returns
- Time data
Definition at line 40 of file Teuchos_StackedTimer.cpp.
The documentation for this class was generated from the following files: