Chombo + EB  3.0
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() [1/5]

OldTimer::OldTimer ( )

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

◆ OldTimer() [2/5]

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

Construct a named timer and add it to a table.

◆ OldTimer() [3/5]

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

◆ OldTimer() [4/5]

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

◆ OldTimer() [5/5]

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

◆ ~OldTimer()

OldTimer::~OldTimer ( )

Member Function Documentation

◆ setup()

void OldTimer::setup ( )

◆ start()

void OldTimer::start ( )

◆ stop() [1/2]

void OldTimer::stop ( )

◆ stop() [2/2]

void OldTimer::stop ( Real wc1)

◆ clear()

void OldTimer::clear ( )

◆ getTimeStampWC()

double OldTimer::getTimeStampWC ( )
inline

◆ wc_time()

double OldTimer::wc_time ( )
inline

◆ mflops()

double OldTimer::mflops ( )

◆ writeTotalPct()

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

◆ Name()

string OldTimer::Name ( )
inline

◆ Count()

long long int OldTimer::Count ( )
inline

◆ tableID()

int OldTimer::tableID ( )
inline

◆ TimerSummary() [1/2]

static void OldTimer::TimerSummary ( const int  bert,
const int  ernie 
)
inlinestatic

◆ TimerInit()

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

◆ TimerSummary() [2/2]

static void OldTimer::TimerSummary ( void  )
static

◆ TimerSummaryWithTITAfiles()

static void OldTimer::TimerSummaryWithTITAfiles ( void  )
static

◆ TimerSummary_()

static void OldTimer::TimerSummary_ ( const int  itita)
staticprivate

◆ writeParentTables()

static void OldTimer::writeParentTables ( FILE *  out,
const double  TimerCost 
)
staticprivate

◆ writeDiagnosticTables()

static void OldTimer::writeDiagnosticTables ( FILE *  out,
const double  TimerCost 
)
staticprivate

Member Data Documentation

◆ TimerList

list<OldTimer*>* OldTimer::TimerList
static

◆ m_tableID

int OldTimer::m_tableID
private

◆ m_accumulated_WCtime

double OldTimer::m_accumulated_WCtime
private

◆ m_last_WCtime_stamp

double OldTimer::m_last_WCtime_stamp
private

◆ tv

struct timeval OldTimer::tv
private

◆ tz

struct timezone OldTimer::tz
private

◆ m_ID

int OldTimer::m_ID
private

◆ m_name

string OldTimer::m_name
private

◆ m_diagnostic

bool OldTimer::m_diagnostic
private

◆ m_Parent

OldTimer& OldTimer::m_Parent
private

◆ m_evenCountAcrossRanks

bool OldTimer::m_evenCountAcrossRanks
private

◆ m_avgWC

double OldTimer::m_avgWC
private

◆ m_minWC

double OldTimer::m_minWC
private

◆ m_maxWC

double OldTimer::m_maxWC
private

◆ m_avgCount

double OldTimer::m_avgCount
private

◆ m_count

long long int OldTimer::m_count
private

◆ m_totalCount

long long int OldTimer::m_totalCount
private

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