Open CASCADE Technology  7.3.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) More...
 
 OSD_PerfMeter (const char *theMeter, const bool theToAutoStart=true)
 Constructs and starts (if autoStart is true) the named meter. More...
 
void Init (const char *theMeter)
 Prepares the named meter. More...
 
void Start () const
 Starts the meter. More...
 
void Stop () const
 Stops the meter. More...
 
void Tick () const
 Increments the counter w/o time measurement. More...
 
void Flush () const
 Outputs the meter data and resets it to initial state. More...
 
 ~OSD_PerfMeter ()
 Assures stopping upon destruction. More...
 

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: