#include <Teuchos_PerformanceMonitorBase.hpp>
Public Member Functions | |
| PerformanceMonitorBase (T &counter, bool reset=false) | |
| virtual | ~PerformanceMonitorBase () |
Static Public Member Functions | |
| RefCountPtr< T > | getNewCounter (const string &name) |
| TableFormat & | format () |
Protected Member Functions | |
| const T & | counter () const |
| T & | counter () |
| bool | isRecursiveCall () const |
A PerformanceMonitorBase will increment its call counter upon every ctor call. Derived types might do more upon construction or destruction; for example, a timer will start upon construction and stop upon destruction.
The class keeps a static list of all counters created using the getNewCounter() method during the course of a run. Counts from this list can then be printed out at the end of the run.
The minimum requirements on the counter for use in the PerformanceMonitorBase are the following methods:
// add one to number of calls void incrementNumCalls() // return the number of calls int numCalls() const // indicate whether the counter is already running bool isRunning() const
Definition at line 75 of file Teuchos_PerformanceMonitorBase.hpp.
|
||||||||||||||||
|
Construct with a counter. Definition at line 79 of file Teuchos_PerformanceMonitorBase.hpp. |
|
|||||||||
|
The dtor for the base class does nothing. Definition at line 86 of file Teuchos_PerformanceMonitorBase.hpp. |
|
||||||||||
|
Create a new counter with the specified name and append it to a global list of counters of this type. New counters should usually be created in this way rather than through a direct ctor call so that they can be appended to the list. Definition at line 94 of file Teuchos_PerformanceMonitorBase.hpp. |
|
|||||||||
|
Get the format that will be used to print a summary of results. Definition at line 104 of file Teuchos_PerformanceMonitorBase.hpp. |
|
|||||||||
|
Access to the counter Definition at line 113 of file Teuchos_PerformanceMonitorBase.hpp. |
|
|||||||||
|
Access to the counter Definition at line 116 of file Teuchos_PerformanceMonitorBase.hpp. |
|
|||||||||
|
Indicate whether the current call is recursive. This can matter in cases such as timing where we don't want to start and stop timers multiple times within a single call stack. Definition at line 122 of file Teuchos_PerformanceMonitorBase.hpp. |
1.3.9.1