ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::MemoryProbe Class Reference

#include <itkMemoryProbe.h>

+ Inheritance diagram for itk::MemoryProbe:
+ Collaboration diagram for itk::MemoryProbe:

Detailed Description

Computes the memory allocated between two points in code.

This class allows the user to trace the memory charge 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 memory are taken from GetProcessMemoryInfo() for Windows, the SMAPS file for Linux and getrusage() otherwise.

Examples:
SphinxExamples/src/Core/Common/TraceMemoryBetweenPoints/Code.cxx.

Definition at line 39 of file itkMemoryProbe.h.

Public Types

typedef double MeanMemoryLoadType
 
typedef SizeValueType MemoryLoadType
 
- Public Types inherited from itk::ResourceProbe< SizeValueType, double >
typedef SizeValueType CountType
 

Public Member Functions

 MemoryProbe ()
 
 ~MemoryProbe ()
 
- Public Member Functions inherited from itk::ResourceProbe< SizeValueType, double >
virtual void ExpandedReport (std::ostream &os=std::cout, bool printSystemInfo=true, bool printReportHead=true)
 
virtual SizeValueType GetMaximum () const
 
virtual double GetMean () const
 
virtual SizeValueType GetMinimum () const
 
virtual std::string GetNameOfProbe () const
 
CountType GetNumberOfIteration () const
 
CountType GetNumberOfStarts () const
 
CountType GetNumberOfStops () const
 
virtual SizeValueType GetStandardDeviation ()
 
virtual SizeValueType GetTotal () const
 
std::string GetType () const
 
std::string GetUnit () const
 
virtual void PrintSystemInformation (std::ostream &os=std::cout)
 
virtual void Report (std::ostream &os=std::cout, bool printSystemInfo=true, bool printReportHead=true)
 
virtual void Reset ()
 
 ResourceProbe (const std::string &type, const std::string &unit)
 
virtual void SetNameOfProbe (const char *nameOfProbe)
 
virtual void Start ()
 
virtual void Stop ()
 
virtual ~ResourceProbe ()
 

Protected Member Functions

virtual MemoryLoadType GetInstantValue (void) const ITK_OVERRIDE
 
- Protected Member Functions inherited from itk::ResourceProbe< SizeValueType, double >
virtual void GetSystemInformation ()
 
virtual void PrintExpandedReportHead (std::ostream &os=std::cout)
 
virtual void PrintReportHead (std::ostream &os=std::cout)
 
virtual void UpdateMinimumMaximumMeasuredValue (SizeValueTypevalue)
 

Private Attributes

MemoryUsageObserver m_MemoryObserver
 

Member Typedef Documentation

Type for measuring the average memory.

Definition at line 51 of file itkMemoryProbe.h.

Type for measuring memory.

Definition at line 48 of file itkMemoryProbe.h.

Constructor & Destructor Documentation

itk::MemoryProbe::MemoryProbe ( )
itk::MemoryProbe::~MemoryProbe ( )

Member Function Documentation

virtual MemoryLoadType itk::MemoryProbe::GetInstantValue ( void  ) const
protectedvirtual

Returns the instant value of the probed system.

Implements itk::ResourceProbe< SizeValueType, double >.

Member Data Documentation

MemoryUsageObserver itk::MemoryProbe::m_MemoryObserver
mutableprivate

Definition at line 57 of file itkMemoryProbe.h.


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