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>
|
| | OSD_PerfMeter ()=default |
| | Constructs a void meter (to further call Init and Start).
|
| |
| | OSD_PerfMeter (const TCollection_AsciiString &theMeterName, const bool theToAutoStart=true) |
| | Constructs and starts (if autoStart is true) the named meter.
|
| |
| | ~OSD_PerfMeter () |
| | Destructs this meter handler. Note that the meter itself is not destructed and will be printed on stdout upon finish of the program. The meter with the name Specified in the constructor can still be used in other places of the code.
|
| |
| void | Init (const TCollection_AsciiString &theMeterName) |
| | Prepares the named meter. If the meter with such name was already created, it will be used. Otherwise, a new meter will be created.
|
| |
| void | Start () const |
| | Starts the meter. If the meter was already started, it will be reset. Note that the meter with the name specified in the constructor can still be used in other places of the code.
|
| |
| void | Stop () const |
| | Stops the meter.
|
| |
| double | Elapsed () const |
| | Returns the elapsed time in seconds since the meter was started.
|
| |
| void | Kill () const |
| | Outputs the meter data and resets it to initial state.
|
| |
| TCollection_AsciiString | Print () const |
| | Prints the data of this meter.
|
| |
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.
◆ OSD_PerfMeter() [1/2]
| OSD_PerfMeter::OSD_PerfMeter |
( |
| ) |
|
|
default |
Constructs a void meter (to further call Init and Start).
◆ OSD_PerfMeter() [2/2]
Constructs and starts (if autoStart is true) the named meter.
- Parameters
-
| theMeterName | Name of the meter. If the meter with such name was already created, and hasn't been killed, it will be used. |
| theToAutoStart | If true, the meter will be started immediately after creation. Otherwise, the user should call Start() method to start the meter. Note that if meter already exists, theToAutoStart == true will reset it. |
◆ ~OSD_PerfMeter()
| OSD_PerfMeter::~OSD_PerfMeter |
( |
| ) |
|
Destructs this meter handler. Note that the meter itself is not destructed and will be printed on stdout upon finish of the program. The meter with the name Specified in the constructor can still be used in other places of the code.
◆ Elapsed()
| double OSD_PerfMeter::Elapsed |
( |
| ) |
const |
Returns the elapsed time in seconds since the meter was started.
◆ Init()
Prepares the named meter. If the meter with such name was already created, it will be used. Otherwise, a new meter will be created.
◆ Kill()
| void OSD_PerfMeter::Kill |
( |
| ) |
const |
Outputs the meter data and resets it to initial state.
◆ Print()
Prints the data of this meter.
◆ PrintALL()
Prints the data of all meters with non-zero elapsed time.
◆ ResetALL()
◆ Start()
| void OSD_PerfMeter::Start |
( |
| ) |
const |
Starts the meter. If the meter was already started, it will be reset. Note that the meter with the name specified in the constructor can still be used in other places of the code.
◆ Stop()
| void OSD_PerfMeter::Stop |
( |
| ) |
const |
The documentation for this class was generated from the following file: