ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::TimeProbe Class Reference

#include <itkTimeProbe.h>

Detailed Description

Computes the time passed between two points in code.

This class allows the user to trace the time passed between the execution of two pieces of code. It can be started and stopped in order to evaluate the execution over multiple passes. The values of time are taken from the RealTimeClock.

See also
ITK Sphinx Examples:

Definition at line 44 of file itkTimeProbe.h.

+ Inheritance diagram for itk::TimeProbe:
+ Collaboration diagram for itk::TimeProbe:

Public Types

using CountType = unsigned long
using Superclass = ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >
using TimeStampType = RealTimeClock::TimeStampType
- Public Types inherited from itk::ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >
using CountType = SizeValueType

Public Member Functions

TimeStampType GetInstantValue () const override
virtual const RealTimeClockGetRealTimeClock () const
void Print (std::ostream &os, Indent indent) const override
 TimeProbe ()
 ~TimeProbe () override
- Public Member Functions inherited from itk::ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >
virtual void ExpandedReport (std::ostream &os=std::cout, bool printSystemInfo=true, bool printReportHead=true, bool useTabs=false)
virtual RealTimeClock::TimeStampType GetMaximum () const
virtual RealTimeClock::TimeStampType GetMean () const
virtual RealTimeClock::TimeStampType GetMinimum () const
virtual std::string GetNameOfProbe () const
CountType GetNumberOfIteration () const
CountType GetNumberOfStarts () const
CountType GetNumberOfStops () const
virtual RealTimeClock::TimeStampType GetStandardDeviation ()
virtual RealTimeClock::TimeStampType GetStandardError ()
virtual RealTimeClock::TimeStampType GetTotal () const
std::string GetType () const
std::string GetUnit () const
virtual void JSONReport (std::ostream &os=std::cout)
virtual void PrintJSONSystemInformation (std::ostream &os=std::cout)
virtual void PrintSystemInformation (std::ostream &os=std::cout)
virtual void Report (std::ostream &os=std::cout, bool printSystemInfo=true, bool printReportHead=true, bool useTabs=false)
virtual void Reset ()
 ResourceProbe (std::string type, std::string unit)
virtual void SetNameOfProbe (const char *nameOfProbe)
virtual void Start ()
virtual void Stop ()
virtual ~ResourceProbe ()=default

Private Attributes

RealTimeClock::Pointer m_RealTimeClock {}

Additional Inherited Members

- Protected Member Functions inherited from itk::ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >
virtual void PrintExpandedReportHead (std::ostream &os=std::cout, bool useTabs=false)
void PrintJSONvar (std::ostream &os, const char *varName, T varValue, unsigned int indent=4, bool comma=true)
virtual void PrintReportHead (std::ostream &os=std::cout, bool useTabs=false)
virtual void UpdateMinimumMaximumMeasuredValue (RealTimeClock::TimeStampType value)

Member Typedef Documentation

◆ CountType

using itk::TimeProbe::CountType = unsigned long

Type for counting how many times the probe has been started and stopped.

Definition at line 51 of file itkTimeProbe.h.

◆ Superclass

Definition at line 47 of file itkTimeProbe.h.

◆ TimeStampType

Type for measuring time. See the RealTimeClock class for details on the precision and units of this clock signal

Definition at line 55 of file itkTimeProbe.h.

Constructor & Destructor Documentation

◆ TimeProbe()

itk::TimeProbe::TimeProbe ( )


◆ ~TimeProbe()

itk::TimeProbe::~TimeProbe ( )


Member Function Documentation

◆ GetInstantValue()

TimeStampType itk::TimeProbe::GetInstantValue ( ) const

Get the current time. Warning: the returned value is not the elapsed time since the last Start() call.

Implements itk::ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >.

◆ GetRealTimeClock()

virtual const RealTimeClock* itk::TimeProbe::GetRealTimeClock ( ) const

Get a handle to m_RealTimeClock.

◆ Print()

void itk::TimeProbe::Print ( std::ostream &  os,
Indent  indent 
) const

Cause the object to print itself out.

Reimplemented from itk::ResourceProbe< RealTimeClock::TimeStampType, RealTimeClock::TimeStampType >.

Member Data Documentation

◆ m_RealTimeClock

RealTimeClock::Pointer itk::TimeProbe::m_RealTimeClock {}

Definition at line 77 of file itkTimeProbe.h.

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