Open CASCADE Technology
6.9.0
|
Provides convenient service on global timers accessed by string name, mostly aimed for debugging purposes. More...
#include <MoniTool_Timer.hxx>
Public Member Functions | |
MoniTool_Timer () | |
Create timer in empty state. More... | |
const OSD_Timer & | Timer () const |
OSD_Timer & | Timer () |
Return reference to embedded OSD_Timer. More... | |
void | Start () |
void | Stop () |
void | Reset () |
Start, Stop and reset the timer In addition to doing that to embedded OSD_Timer, manage also counter of hits. More... | |
Standard_Integer | Count () const |
Return value of hits counter (count of Start/Stop pairs) More... | |
Standard_Integer | IsRunning () const |
Returns value of nesting counter. More... | |
Standard_Real | CPU () |
Return value of CPU time minus accumulated amendment. More... | |
Standard_Real | Amend () const |
Return value of accumulated amendment on CPU time. More... | |
void | Dump (Standard_OStream &ostr) |
Dumps current state of a timer shortly (one-line output) More... | |
Public Member Functions inherited from MMgt_TShared | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual const Handle_Standard_Type & | DynamicType () const |
Returns a type information object about this object. More... | |
Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
virtual Handle_Standard_Transient | This () const |
Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
Static Public Member Functions | |
static Handle< MoniTool_Timer > | Timer (const Standard_CString name) |
Returns a timer from a dictionary by its name If timer not existed, creates a new one. More... | |
static void | Start (const Standard_CString name) |
static void | Stop (const Standard_CString name) |
Inline methods to conveniently start/stop timer by name Shortcut to Timer(name)->Start/Stop() More... | |
static MoniTool_DataMapOfTimer & | Dictionary () |
Returns map of timers. More... | |
static void | ClearTimers () |
Clears map of timers. More... | |
static void | DumpTimers (Standard_OStream &ostr) |
Dumps contents of the whole dictionary. More... | |
static void | ComputeAmendments () |
Computes and remembers amendments for times to access, start, and stop of timer, and estimates second-order error measured by 10 nested timers. More... | |
static void | GetAmendments (Standard_Real &Access, Standard_Real &Internal, Standard_Real &External, Standard_Real &Error10) |
The computed amendmens are returned (for information only) More... | |
Provides convenient service on global timers accessed by string name, mostly aimed for debugging purposes.
As an instance, envelopes the OSD_Timer to have it as Handle
As a tool, supports static dictionary of timers and provides static methods to easily access them
MoniTool_Timer::MoniTool_Timer | ( | ) |
Create timer in empty state.
Standard_Real MoniTool_Timer::Amend | ( | ) | const |
Return value of accumulated amendment on CPU time.
|
static |
Clears map of timers.
|
static |
Computes and remembers amendments for times to access, start, and stop of timer, and estimates second-order error measured by 10 nested timers.
Standard_Integer MoniTool_Timer::Count | ( | ) | const |
Return value of hits counter (count of Start/Stop pairs)
Standard_Real MoniTool_Timer::CPU | ( | ) |
Return value of CPU time minus accumulated amendment.
|
static |
Returns map of timers.
void MoniTool_Timer::Dump | ( | Standard_OStream & | ostr | ) |
Dumps current state of a timer shortly (one-line output)
|
static |
Dumps contents of the whole dictionary.
|
static |
The computed amendmens are returned (for information only)
Standard_Integer MoniTool_Timer::IsRunning | ( | ) | const |
Returns value of nesting counter.
void MoniTool_Timer::Reset | ( | ) |
Start, Stop and reset the timer In addition to doing that to embedded OSD_Timer, manage also counter of hits.
void MoniTool_Timer::Start | ( | ) |
|
static |
void MoniTool_Timer::Stop | ( | ) |
|
static |
Inline methods to conveniently start/stop timer by name Shortcut to Timer(name)->Start/Stop()
const OSD_Timer& MoniTool_Timer::Timer | ( | ) | const |
|
static |
Returns a timer from a dictionary by its name If timer not existed, creates a new one.