Chombo + EB + MF  3.2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
OldTimer Class Reference

#include <OldTimer.H>

Public Member Functions

 OldTimer ()
 Construct an unnamed timer that has no relation to any other instance. More...
 
 OldTimer (const string &a_name, const int a_tableID)
 Construct a named timer and add it to a table. More...
 
 OldTimer (const string &a_name, OldTimer &, const int a_tableID)
 
 OldTimer (const string &a_name, OldTimer &)
 
 OldTimer (const string &a_name, OldTimer &, const int a_tableID, bool)
 
 ~OldTimer ()
 
void setup ()
 
void start ()
 
void stop ()
 
void stop (Real &wc1)
 
void clear ()
 
double getTimeStampWC ()
 
double wc_time ()
 
double mflops ()
 
void writeTotalPct (const string &a_extra="")
 
string Name ()
 
long long int Count ()
 
int tableID ()
 

Static Public Member Functions

static void TimerSummary (const int bert, const int ernie)
 
static void TimerInit (const int rank)
 
static void TimerSummary (void)
 
static void TimerSummaryWithTITAfiles (void)
 

Static Public Attributes

static list< OldTimer * > * TimerList
 

Static Private Member Functions

static void TimerSummary_ (const int itita)
 
static void writeParentTables (FILE *out, const double TimerCost)
 
static void writeDiagnosticTables (FILE *out, const double TimerCost)
 

Private Attributes

int m_tableID
 
double m_accumulated_WCtime
 
double m_last_WCtime_stamp
 
struct timeval tv
 
struct timezone tz
 
int m_ID
 
string m_name
 
bool m_diagnostic
 
OldTimerm_Parent
 
bool m_evenCountAcrossRanks
 
double m_avgWC
 
double m_minWC
 
double m_maxWC
 
double m_avgCount
 
long long int m_count
 
long long int m_totalCount
 

Detailed Description

A simple class for keeping track of elapsed time.

CH_XD::OldTimer provides the ability to measure the passage of wall-clock time within units of code, and relate multiple measurements in a hierarchical manner.

A timer can be started, stopped, reset and printed out. Multiple timers can be instantiated and related to each other hierarchically: a timer instance may have a parent and children. The hierarchical relationship is relevant only when printing out the summary report.

In parallel, the timers on each proc operate independently. Only the summary operations cause communication between procs.

Constructor & Destructor Documentation

OldTimer::OldTimer ( )

Construct an unnamed timer that has no relation to any other instance.

OldTimer::OldTimer ( const string &  a_name,
const int  a_tableID 
)

Construct a named timer and add it to a table.

OldTimer::OldTimer ( const string &  a_name,
OldTimer ,
const int  a_tableID 
)
OldTimer::OldTimer ( const string &  a_name,
OldTimer  
)
OldTimer::OldTimer ( const string &  a_name,
OldTimer ,
const int  a_tableID,
bool   
)
OldTimer::~OldTimer ( )

Member Function Documentation

void OldTimer::setup ( )
void OldTimer::start ( )
void OldTimer::stop ( )
void OldTimer::stop ( Real wc1)
void OldTimer::clear ( )
double OldTimer::getTimeStampWC ( )
inline
double OldTimer::wc_time ( )
inline
double OldTimer::mflops ( )
void OldTimer::writeTotalPct ( const string &  a_extra = "")
string OldTimer::Name ( )
inline
long long int OldTimer::Count ( )
inline
int OldTimer::tableID ( )
inline
static void OldTimer::TimerSummary ( const int  bert,
const int  ernie 
)
inlinestatic
static void OldTimer::TimerInit ( const int  rank)
static
static void OldTimer::TimerSummary ( void  )
static
static void OldTimer::TimerSummaryWithTITAfiles ( void  )
static
static void OldTimer::TimerSummary_ ( const int  itita)
staticprivate
static void OldTimer::writeParentTables ( FILE *  out,
const double  TimerCost 
)
staticprivate
static void OldTimer::writeDiagnosticTables ( FILE *  out,
const double  TimerCost 
)
staticprivate

Member Data Documentation

list<OldTimer*>* OldTimer::TimerList
static
int OldTimer::m_tableID
private
double OldTimer::m_accumulated_WCtime
private
double OldTimer::m_last_WCtime_stamp
private
struct timeval OldTimer::tv
private
struct timezone OldTimer::tz
private
int OldTimer::m_ID
private
string OldTimer::m_name
private
bool OldTimer::m_diagnostic
private
OldTimer& OldTimer::m_Parent
private
bool OldTimer::m_evenCountAcrossRanks
private
double OldTimer::m_avgWC
private
double OldTimer::m_minWC
private
double OldTimer::m_maxWC
private
double OldTimer::m_avgCount
private
long long int OldTimer::m_count
private
long long int OldTimer::m_totalCount
private

The documentation for this class was generated from the following file: