Teuchos - Trilinos Tools Package
Version of the Day
|
the basic timer used elsewhere, uses MPI_Wtime for time More...
#include <Teuchos_StackedTimer.hpp>
Public Member Functions | |
void | start () |
Start a currently stopped timer. More... | |
void | stop () |
Stop a current running timer and accumulate time difference. More... | |
unsigned long long | incrementUpdates (unsigned long long count=1) |
Increment the total number of items updated between a start stop. More... | |
double | accumulatedTime () const |
Get the total accumulated time since last reset or construction when the timer is running. More... | |
void | setAccumulatedTime (double accum=0) |
Setter for accumulated time. More... | |
double | accumulatedTimePerUpdate () const |
return the average time per item updated More... | |
double | accumulatedTimePerTimerCall () const |
return the average time per timer start/stop More... | |
double | difference (const BaseTimer &from) const |
Return the difference between two timers in seconds,. More... | |
void | reset () |
Reset all the timer stats, throws if it is already running. More... | |
bool | running () const |
Returns true if the timer is currently accumulating time. More... | |
unsigned long | numCalls () const |
Returns the number of calls to start(). More... | |
unsigned long long | numUpdates () const |
Returns the number of updates added to this timer. More... | |
void | overrideNumCallsForUnitTesting (const unsigned long num_calls) |
Sets the number of calls to start() for this timer. This is only used for unit testing. More... | |
void | overrideNumUpdatesForUnitTesting (const unsigned long long num_updates) |
Sets the number of counts for this timer. This is only used for unit testing. More... | |
the basic timer used elsewhere, uses MPI_Wtime for time
This class hold a time and number of times this timer is called, and a count of how many "updates" this timer has services. Example if you have a mesh of 100 elements your count might be 7, but total iterations would be 700 this number is useful for dynamic systems where the total number of items services might change in time
Definition at line 46 of file Teuchos_StackedTimer.hpp.
|
inline |
Start a currently stopped timer.
Definition at line 55 of file Teuchos_StackedTimer.hpp.
|
inline |
Stop a current running timer and accumulate time difference.
Definition at line 65 of file Teuchos_StackedTimer.hpp.
|
inline |
Increment the total number of items updated between a start stop.
Definition at line 73 of file Teuchos_StackedTimer.hpp.
|
inline |
Get the total accumulated time since last reset or construction when the timer is running.
Definition at line 76 of file Teuchos_StackedTimer.hpp.
|
inline |
Setter for accumulated time.
Definition at line 79 of file Teuchos_StackedTimer.hpp.
|
inline |
return the average time per item updated
This returns the time on average that the code spends updating an iteration. If it is running than it will not include the current time. It differs from accumulatedTimePerTimerCall in that it is meant to be timer per event other that start/stop, like mesh update
Definition at line 89 of file Teuchos_StackedTimer.hpp.
|
inline |
return the average time per timer start/stop
This returns the time on average that the code spends between a call to start and stop. If it is running than it will not include the current time
Definition at line 105 of file Teuchos_StackedTimer.hpp.
|
inline |
Return the difference between two timers in seconds,.
[in] | from | reference time you are computing difference from |
Definition at line 119 of file Teuchos_StackedTimer.hpp.
|
inline |
Reset all the timer stats, throws if it is already running.
Definition at line 124 of file Teuchos_StackedTimer.hpp.
|
inline |
Returns true if the timer is currently accumulating time.
Definition at line 132 of file Teuchos_StackedTimer.hpp.
|
inline |
Returns the number of calls to start().
Definition at line 135 of file Teuchos_StackedTimer.hpp.
|
inline |
Returns the number of updates added to this timer.
Definition at line 138 of file Teuchos_StackedTimer.hpp.
|
inline |
Sets the number of calls to start() for this timer. This is only used for unit testing.
Definition at line 141 of file Teuchos_StackedTimer.hpp.
|
inline |
Sets the number of counts for this timer. This is only used for unit testing.
Definition at line 145 of file Teuchos_StackedTimer.hpp.