Teuchos::TimeMonitor Class Reference

A timer class that starts when constructed and stops when the destructor is called. More...

#include <Teuchos_TimeMonitor.hpp>

Collaboration diagram for Teuchos::TimeMonitor:

[legend]
List of all members.

Public Member Functions

 TimeMonitor (Time &timer)
 Constructor starts timer.
 ~TimeMonitor ()
 Destructor causes timer to stop.

Static Public Member Functions

void summarize ()
 Print summary statistics for a group of timers. Timings are gathered from all processors.
RefCountPtr< TimegetNewTimer (const string &name)
 Create a new timer with the given name, and append it to the list of timers to be used.

Static Private Member Functions

void gatherTimings (const Array< double > &timings, Array< double > &minTime, Array< double > &avgTime, Array< double > &maxTime)
 collect summary timings from all processors

Private Attributes

Timetimer_
bool isRoot_

Static Private Attributes

Array< RefCountPtr< Time > > timers_

Detailed Description

A timer class that starts when constructed and stops when the destructor is called.

Termination upon destruction lets this timer behave correctly even if scope is exited because of an exception.

Note:
Teuchos::TimeMonitor uses the Teuchos::Time class internally.
Examples:

TimeMonitor/cxx_main.cpp.

Definition at line 63 of file Teuchos_TimeMonitor.hpp.


Constructor & Destructor Documentation

Teuchos::TimeMonitor::TimeMonitor Time timer  )  [inline]
 

Constructor starts timer.

Definition at line 68 of file Teuchos_TimeMonitor.hpp.

Teuchos::TimeMonitor::~TimeMonitor  )  [inline]
 

Destructor causes timer to stop.

Definition at line 75 of file Teuchos_TimeMonitor.hpp.


Member Function Documentation

void TimeMonitor::summarize  )  [static]
 

Print summary statistics for a group of timers. Timings are gathered from all processors.

Examples:
TimeMonitor/cxx_main.cpp.

Definition at line 45 of file Teuchos_TimeMonitor.cpp.

RefCountPtr< Time > TimeMonitor::getNewTimer const string &  name  )  [static]
 

Create a new timer with the given name, and append it to the list of timers to be used.

Examples:
TimeMonitor/cxx_main.cpp.

Definition at line 37 of file Teuchos_TimeMonitor.cpp.

void TimeMonitor::gatherTimings const Array< double > &  timings,
Array< double > &  minTime,
Array< double > &  avgTime,
Array< double > &  maxTime
[static, private]
 

collect summary timings from all processors

Definition at line 87 of file Teuchos_TimeMonitor.cpp.


Member Data Documentation

Time& Teuchos::TimeMonitor::timer_ [private]
 

Definition at line 89 of file Teuchos_TimeMonitor.hpp.

bool Teuchos::TimeMonitor::isRoot_ [private]
 

Definition at line 90 of file Teuchos_TimeMonitor.hpp.

Array< RefCountPtr< Time > > TimeMonitor::timers_ [static, private]
 

Definition at line 35 of file Teuchos_TimeMonitor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:41:20 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1