#include <cktimer.h>
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 |
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.
CkThresholdTimer::CkThresholdTimer | ( | const char * | what, | |
double | thresh = 0.001 | |||
) | [inline] |
CkThresholdTimer::~CkThresholdTimer | ( | ) | [inline] |
CkThresholdTimer::CkThresholdTimer | ( | const char * | what, | |
double | thresh = 0.001 | |||
) | [inline] |
Definition at line 2844 of file ParFUM_internals.h.
CkThresholdTimer::~CkThresholdTimer | ( | ) | [inline] |
Definition at line 2847 of file ParFUM_internals.h.
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 2833 of file ParFUM_internals.h.
References CmiWallTimer().
void CkThresholdTimer::done_ | ( | void | ) | [inline, private] |
Definition at line 2837 of file ParFUM_internals.h.
References CmiPrintf(), and CmiWallTimer().
void CkThresholdTimer::start | ( | const char * | what | ) | [inline] |
Definition at line 2846 of file ParFUM_internals.h.
double CkThresholdTimer::threshold [private] |
double CkThresholdTimer::lastStart [private] |
const char* CkThresholdTimer::lastWhat [private] |
const char* CkThresholdTimer::lastWhat [private] |
Definition at line 2831 of file ParFUM_internals.h.