Open CASCADE Technology 7.8.0
Public Member Functions | Protected Attributes
OSD_PerfMeter Class Reference

This class enables measuring the CPU time between two points of code execution, regardless of the scope of these points of code. A meter is identified by its name (string). So multiple objects in various places of user code may point to the same meter. The results will be printed on stdout upon finish of the program. For details see OSD_PerfMeter.h. More...

#include <OSD_PerfMeter.hxx>

Public Member Functions

 OSD_PerfMeter ()
 Constructs a void meter (to further call Init and Start)
 
 OSD_PerfMeter (const char *theMeter, const bool theToAutoStart=true)
 Constructs and starts (if autoStart is true) the named meter.
 
void Init (const char *theMeter)
 Prepares the named meter.
 
void Start () const
 Starts the meter.
 
void Stop () const
 Stops the meter.
 
void Tick () const
 Increments the counter w/o time measurement.
 
void Flush () const
 Outputs the meter data and resets it to initial state.
 
 ~OSD_PerfMeter ()
 Assures stopping upon destruction.
 

Protected Attributes

int myIMeter
 

Detailed Description

This class enables measuring the CPU time between two points of code execution, regardless of the scope of these points of code. A meter is identified by its name (string). So multiple objects in various places of user code may point to the same meter. The results will be printed on stdout upon finish of the program. For details see OSD_PerfMeter.h.

Constructor & Destructor Documentation

◆ OSD_PerfMeter() [1/2]

OSD_PerfMeter::OSD_PerfMeter ( )
inline

Constructs a void meter (to further call Init and Start)

◆ OSD_PerfMeter() [2/2]

OSD_PerfMeter::OSD_PerfMeter ( const char theMeter,
const bool  theToAutoStart = true 
)
inline

Constructs and starts (if autoStart is true) the named meter.

◆ ~OSD_PerfMeter()

OSD_PerfMeter::~OSD_PerfMeter ( )
inline

Assures stopping upon destruction.

Member Function Documentation

◆ Flush()

void OSD_PerfMeter::Flush ( ) const
inline

Outputs the meter data and resets it to initial state.

◆ Init()

void OSD_PerfMeter::Init ( const char theMeter)
inline

Prepares the named meter.

◆ Start()

void OSD_PerfMeter::Start ( ) const
inline

Starts the meter.

◆ Stop()

void OSD_PerfMeter::Stop ( ) const
inline

Stops the meter.

◆ Tick()

void OSD_PerfMeter::Tick ( ) const
inline

Increments the counter w/o time measurement.

Field Documentation

◆ myIMeter

int OSD_PerfMeter::myIMeter
protected

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