PPL Logo

CkThresholdTimer Class Reference
[ParFUM Unstructured Mesh Framework]

Time a sequence of operations, printing out the names and times of any operations that exceed a threshold. More...

#include <cktimer.h>

Collaboration diagram for CkThresholdTimer:

Collaboration graph
[legend]

Public Member Functions

 CkThresholdTimer (const char *what, double thresh=0.001)
void start (const char *what)
 ~CkThresholdTimer ()
 CkThresholdTimer (const char *what, double thresh=0.001)
void start (const char *what)
 ~CkThresholdTimer ()

Private Member Functions

void start_ (const char *what)
void done_ (void)
void start_ (const char *what)
void done_ (void)

Private Attributes

double threshold
double lastStart
const char * lastWhat
const char * lastWhat

Detailed Description

Time a sequence of operations, printing out the names and times of any operations that exceed a threshold.

Time a sequence of operations, printing out the names and times of any operations that exceed a threshold.

Use it with only the constructor and destructor like: void foo(void) { CkThresholdTimer t("foo"); ... } (this times the whole execution of the routine, all the way to t's destructor is called on function return)

Or, you can start different sections like: void bar(void) { CkThresholdTimer t("first"); ... t.start("second"); ... t.start("third"); ... }

This class *only* prints out the time if it exceeds a threshold-- by default, one millisecond.

Use it with only the constructor and destructor like: void foo(void) { CkThresholdTimer t("foo"); ... } (this times the whole execution of the routine, all the way to t's destructor is called on function return)

Or, you can start different sections like: void bar(void) { CkThresholdTimer t("first"); ... t.start("second"); ... t.start("third"); ... }

This class *only* prints out the time if it exceeds a threshold-- by default, one millisecond.

Definition at line 28 of file cktimer.h.


Constructor & Destructor Documentation

CkThresholdTimer::CkThresholdTimer ( const char *  what,
double  thresh = 0.001 
) [inline]

Definition at line 44 of file cktimer.h.

References start_().

CkThresholdTimer::~CkThresholdTimer (  )  [inline]

Definition at line 47 of file cktimer.h.

References done_().

CkThresholdTimer::CkThresholdTimer ( const char *  what,
double  thresh = 0.001 
) [inline]

Definition at line 3076 of file ParFUM_internals.h.

CkThresholdTimer::~CkThresholdTimer (  )  [inline]

Definition at line 3079 of file ParFUM_internals.h.


Member Function Documentation

void CkThresholdTimer::start_ ( const char *  what  )  [inline, private]

Definition at line 33 of file cktimer.h.

References CmiWallTimer(), lastStart, and lastWhat.

Referenced by CkThresholdTimer(), and start().

void CkThresholdTimer::done_ ( void   )  [inline, private]

Definition at line 37 of file cktimer.h.

References CmiPrintf(), CmiWallTimer(), lastStart, lastWhat, and threshold.

Referenced by start(), and ~CkThresholdTimer().

void CkThresholdTimer::start ( const char *  what  )  [inline]

Definition at line 46 of file cktimer.h.

References done_(), and start_().

Referenced by FEM_Mesh_partition(), and FEM_Mesh_split().

void CkThresholdTimer::start_ ( const char *  what  )  [inline, private]

Definition at line 3065 of file ParFUM_internals.h.

References CmiWallTimer().

void CkThresholdTimer::done_ ( void   )  [inline, private]

Definition at line 3069 of file ParFUM_internals.h.

References CmiPrintf(), and CmiWallTimer().

void CkThresholdTimer::start ( const char *  what  )  [inline]

Definition at line 3078 of file ParFUM_internals.h.


Field Documentation

Definition at line 29 of file cktimer.h.

Referenced by done_().

Definition at line 30 of file cktimer.h.

Referenced by done_(), and start_().

const char* CkThresholdTimer::lastWhat [private]

Definition at line 31 of file cktimer.h.

Referenced by done_(), and start_().

const char* CkThresholdTimer::lastWhat [private]

Definition at line 3063 of file ParFUM_internals.h.


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

Generated on Fri May 25 08:02:24 2012 for Charm++ by  doxygen 1.5.5