OldTimer Class Reference

#include <OldTimer.H>

List of all members.

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.

Public Member Functions

 OldTimer ()
 Construct an unnamed timer that has no relation to any other instance.
 OldTimer (const string &a_name, const int a_tableID)
 Construct a named timer and add it to a table.
 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
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

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 ( const string &  a_name,
OldTimer ,
const int  a_tableID,

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]

References m_accumulated_WCtime.

double OldTimer::mflops (  ) 

void OldTimer::writeTotalPct ( const string &  a_extra = ""  ) 

string OldTimer::Name (  )  [inline]

References m_name.

long long int OldTimer::Count (  )  [inline]

References m_count.

int OldTimer::tableID (  )  [inline]

References m_tableID.

static void OldTimer::TimerSummary ( const int  bert,
const int  ernie 
) [inline, static]

References TimerSummary().

static void OldTimer::TimerInit ( const int  rank  )  [static]

static void OldTimer::TimerSummary ( void   )  [static]

Referenced by TimerSummary().

static void OldTimer::TimerSummaryWithTITAfiles ( void   )  [static]

static void OldTimer::TimerSummary_ ( const int  itita  )  [static, private]

static void OldTimer::writeParentTables ( FILE *  out,
const double  TimerCost 
) [static, private]

static void OldTimer::writeDiagnosticTables ( FILE *  out,
const double  TimerCost 
) [static, private]

Member Data Documentation

list<OldTimer*>* OldTimer::TimerList [static]

int OldTimer::m_tableID [private]

Referenced by tableID().

Referenced by wc_time().

struct timeval OldTimer::tv [read, private]

struct timezone OldTimer::tz [read, private]

int OldTimer::m_ID [private]

string OldTimer::m_name [private]

Referenced by Name().

bool OldTimer::m_diagnostic [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]

Referenced by Count().

long long int OldTimer::m_totalCount [private]

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

Generated on Fri Apr 5 04:25:14 2019 for Chombo + EB by  doxygen 1.5.5