Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts
Public Types | Public Member Functions | Protected Member Functions

itk::MemoryProbe Class Reference

Class for computing the memory allocated between two points in the code. More...

#include <itkMemoryProbe.h>

Inheritance diagram for itk::MemoryProbe:
Inheritance graph
[legend]
Collaboration diagram for itk::MemoryProbe:
Collaboration graph
[legend]

List of all members.

Public Types

typedef unsigned long CountType
typedef double MeanMemoryLoadType
typedef long MemoryLoadType

Public Member Functions

double GetMean (void) const
CountType GetNumberOfStarts (void) const
CountType GetNumberOfStops (void) const
long GetTotal (void) const
std::string GetType (void) const
std::string GetUnit (void) const
 MemoryProbe ()
void Start (void)
void Stop (void)
 ~MemoryProbe ()

Protected Member Functions

virtual MemoryLoadType GetInstantValue (void) const

Detailed Description

Class for computing the memory allocated between two points in the 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.

Definition at line 38 of file itkMemoryProbe.h.


Member Typedef Documentation

typedef unsigned long itk::ResourceProbe< long , double >::CountType [inherited]

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

Definition at line 45 of file itkResourceProbe.h.

Type for measuring the average memory.

Definition at line 50 of file itkMemoryProbe.h.

Type for measuring memory.

Definition at line 47 of file itkMemoryProbe.h.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual MemoryLoadType itk::MemoryProbe::GetInstantValue ( void   )  const [protected, virtual]

Returns the instant value of the probed system.

Implements itk::ResourceProbe< long, double >.

double itk::ResourceProbe< long , double >::GetMean ( void   )  const [inherited]

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< long , double >::GetNumberOfStarts ( void   )  const [inherited]

Returns the number of times that the probe has been started

CountType itk::ResourceProbe< long , double >::GetNumberOfStops ( void   )  const [inherited]

Returns the number of times that the probe has been stopped

long itk::ResourceProbe< long , double >::GetTotal ( void   )  const [inherited]

Returns the accumulated value changes between the starts and stops of the probe

std::string itk::ResourceProbe< long , double >::GetType ( void   )  const [inherited]

Returns the type probed value

std::string itk::ResourceProbe< long , double >::GetUnit ( void   )  const [inherited]

Returns the unit probed value

void itk::ResourceProbe< long , double >::Start ( void   )  [inherited]

Start counting the change of value

void itk::ResourceProbe< long , double >::Stop ( void   )  [inherited]

Stop counting the change of value


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

Generated at Tue Jul 13 2010 00:10:29 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000