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_().

Here is the call graph for this function:

CkThresholdTimer::~CkThresholdTimer (  )  [inline]

Definition at line 47 of file cktimer.h.

References done_().

Here is the call graph for this function:

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.


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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 2833 of file ParFUM_internals.h.

References CmiWallTimer().

Here is the call graph for this function:

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

Definition at line 2837 of file ParFUM_internals.h.

References CmiPrintf(), and CmiWallTimer().

Here is the call graph for this function:

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

Definition at line 2846 of file ParFUM_internals.h.


Field Documentation

double CkThresholdTimer::threshold [private]

Definition at line 29 of file cktimer.h.

Referenced by done_().

double CkThresholdTimer::lastStart [private]

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 2831 of file ParFUM_internals.h.


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

Generated on Mon Sep 21 08:21:39 2020 for Charm++ by  doxygen 1.5.5