SAMRAI::tbox::Timer Class Reference

#include <source/toolbox/timers/Timer.h>

Inheritance diagram for SAMRAI::tbox::Timer:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Timer ()
const std::string & getName () const
int getIdentifier () const
void start ()
void stop ()
void startExclusive ()
void stopExclusive ()
void reset ()
double getTotalSystemTime () const
double getTotalUserTime () const
double getTotalWallclockTime () const
double getMaxWallclockTime () const
double getExclusiveSystemTime () const
double getExclusiveUserTime () const
double getExclusiveWallclockTime () const
bool isActive () const
bool isRunning () const
void setConcurrentTimer (const int id)
bool isConcurrentTimer (const int id) const
int getNumberAccesses () const
double computeLoadBalanceEfficiency ()
void computeMaxWallclock ()
virtual void putToDatabase (Pointer< Database > db)
virtual void getFromRestart (Pointer< Database > db)

Protected Member Functions

 Timer (const std::string &name, const int id=-1)
void setInactive ()

Friends

class TimerManager

Constructor & Destructor Documentation

SAMRAI::tbox::Timer::~Timer (  )  [virtual]

Empty virtual destructor for Timer class.

SAMRAI::tbox::Timer::Timer ( const std::string &  name,
const int  id = -1 
) [protected]

The constructor for the Timer class sets timer name string and integer identifiers, and initializes the timer state.


Member Function Documentation

const std::string & SAMRAI::tbox::Timer::getName (  )  const [inline]

Return string name for timer.

int SAMRAI::tbox::Timer::getIdentifier (  )  const [inline]

Return integer identfier for timer.

void SAMRAI::tbox::Timer::start (  ) 

Start the timer if active.

void SAMRAI::tbox::Timer::stop (  ) 

Stop the timer if active.

void SAMRAI::tbox::Timer::startExclusive (  )  [inline]

Start exclusive time.

void SAMRAI::tbox::Timer::stopExclusive (  )  [inline]

Stop exclusive time.

void SAMRAI::tbox::Timer::reset (  ) 

Reset the state of the timing information.

double SAMRAI::tbox::Timer::getTotalSystemTime (  )  const [inline]

Return total system time (between starts and stops)

double SAMRAI::tbox::Timer::getTotalUserTime (  )  const [inline]

Return total user time

double SAMRAI::tbox::Timer::getTotalWallclockTime (  )  const [inline]

Return total wallclock time

double SAMRAI::tbox::Timer::getMaxWallclockTime (  )  const [inline]

Return max wallclock time

double SAMRAI::tbox::Timer::getExclusiveSystemTime (  )  const [inline]

Return exclusive system time.

double SAMRAI::tbox::Timer::getExclusiveUserTime (  )  const [inline]

Return exclusive user time.

double SAMRAI::tbox::Timer::getExclusiveWallclockTime (  )  const [inline]

Return exclusive wallclock time.

bool SAMRAI::tbox::Timer::isActive (  )  const [inline]

Return true if the timer is active; false otherwise.

bool SAMRAI::tbox::Timer::isRunning (  )  const [inline]

Return true if timer is running; false otherwise.

void SAMRAI::tbox::Timer::setConcurrentTimer ( const int  id  )  [inline]

Mark given integer as id of timer running concurrently with this one.

bool SAMRAI::tbox::Timer::isConcurrentTimer ( const int  id  )  const [inline]

Return if the timer id is running concurrently with this one.

int SAMRAI::tbox::Timer::getNumberAccesses (  )  const [inline]

Return number of accesses to start()-stop() functions for the timer.

double SAMRAI::tbox::Timer::computeLoadBalanceEfficiency (  ) 

Compute load balance efficiency based on wallclock (non-exclusive) time.

void SAMRAI::tbox::Timer::computeMaxWallclock (  ) 

Compute max wallclock time based on total (non-exclusive) time.

void SAMRAI::tbox::Timer::putToDatabase ( Pointer< Database db  )  [virtual]

Write timer data members to database.

void SAMRAI::tbox::Timer::getFromRestart ( Pointer< Database db  )  [virtual]

Read restarted times from restart database. When assertion checking is on, the database pointer must be non-null.

void SAMRAI::tbox::Timer::setInactive (  )  [inline, protected]


Friends And Related Function Documentation

friend class TimerManager [friend]


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:09 2009 for SAMRAI by  doxygen 1.5.1