ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkResourceProbe.h>
Computes the change of a value between two points in code.
This class is the base class of all the probes (time, memory, etc.) between the execution of two pieces of code. It can be started and stopped in order to evaluate the execution over multiple passes.
Definition at line 39 of file itkResourceProbe.h.
Public Types | |
typedef SizeValueType | CountType |
Public Member Functions | |
virtual ValueType | GetInstantValue (void) const =0 |
MeanType | GetMean () const |
CountType | GetNumberOfStarts () const |
CountType | GetNumberOfStops () const |
ValueType | GetTotal () const |
std::string | GetType () const |
std::string | GetUnit () const |
void | Reset () |
ResourceProbe (const std::string &type, const std::string &unit) | |
void | Start () |
void | Stop () |
virtual | ~ResourceProbe () |
Private Attributes | |
CountType | m_NumberOfStarts |
CountType | m_NumberOfStops |
ValueType | m_StartValue |
ValueType | m_TotalValue |
std::string | m_TypeString |
std::string | m_UnitString |
typedef SizeValueType itk::ResourceProbe< ValueType, MeanType >::CountType |
Type for counting how many times the probe has been started and stopped.
Definition at line 45 of file itkResourceProbe.h.
itk::ResourceProbe< ValueType, MeanType >::ResourceProbe | ( | const std::string & | type, |
const std::string & | unit | ||
) |
Constructor
|
virtual |
Destructor
|
pure virtual |
Returns the instant value of the probed system.
Implemented in itk::TimeProbe, and itk::MemoryProbe.
MeanType itk::ResourceProbe< ValueType, MeanType >::GetMean | ( | ) | const |
Returns the average value changes between the starts and stops of the probe. Stop() has to be called at least once, returns 0 otherwise.
CountType itk::ResourceProbe< ValueType, MeanType >::GetNumberOfStarts | ( | ) | const |
Returns the number of times that the probe has been started
CountType itk::ResourceProbe< ValueType, MeanType >::GetNumberOfStops | ( | ) | const |
Returns the number of times that the probe has been stopped
ValueType itk::ResourceProbe< ValueType, MeanType >::GetTotal | ( | ) | const |
Returns the accumulated value changes between the starts and stops of the probe
std::string itk::ResourceProbe< ValueType, MeanType >::GetType | ( | ) | const |
Returns the type probed value
std::string itk::ResourceProbe< ValueType, MeanType >::GetUnit | ( | ) | const |
Returns the unit probed value
void itk::ResourceProbe< ValueType, MeanType >::Reset | ( | ) |
Reset the probe
void itk::ResourceProbe< ValueType, MeanType >::Start | ( | ) |
Start counting the change of value
void itk::ResourceProbe< ValueType, MeanType >::Stop | ( | ) |
Stop counting the change of value.
If a matching Start() has not been called before, there is no effect.
|
private |
Definition at line 98 of file itkResourceProbe.h.
|
private |
Definition at line 99 of file itkResourceProbe.h.
|
private |
Definition at line 95 of file itkResourceProbe.h.
|
private |
Definition at line 96 of file itkResourceProbe.h.
|
private |
Definition at line 101 of file itkResourceProbe.h.
|
private |
Definition at line 102 of file itkResourceProbe.h.