Public Member Functions | Protected Attributes
DUtils::Profiler Class Reference

#include <Profiler.h>

List of all members.

Public Member Functions

double getMaxTime (const std::string &name="") const
double getMeanTime (const std::string &name="") const
double getMinTime (const std::string &name="") const
double getStdevTime (const std::string &name="") const
void getTime (std::vector< double > &time, const std::string &name="") const
void profile (const std::string &name="")
 Profiler ()
void stop (const std::string &name="")
void stopAndScale (double scale, const std::string &name="")
virtual ~Profiler ()

Protected Attributes

std::string m_last_profile
std::map< std::string,
std::vector< double > > 
m_profiles
std::map< std::string, Timestampm_start_points

Detailed Description

Definition at line 48 of file Profiler.h.


Constructor & Destructor Documentation

Definition at line 52 of file Profiler.h.

virtual DUtils::Profiler::~Profiler ( ) [inline, virtual]

Definition at line 53 of file Profiler.h.


Member Function Documentation

double Profiler::getMaxTime ( const std::string &  name = "") const

Definition at line 117 of file Profiler.cpp.

double Profiler::getMeanTime ( const std::string &  name = "") const

Definition at line 75 of file Profiler.cpp.

double Profiler::getMinTime ( const std::string &  name = "") const

Definition at line 103 of file Profiler.cpp.

double Profiler::getStdevTime ( const std::string &  name = "") const

Definition at line 89 of file Profiler.cpp.

void Profiler::getTime ( std::vector< double > &  time,
const std::string &  name = "" 
) const

Definition at line 132 of file Profiler.cpp.

void Profiler::profile ( const std::string &  name = "")

Starts profiling the given item. If it was already been profiled, the last call to profile with that item is ignored

Parameters:
namename of item to profile

Definition at line 38 of file Profiler.cpp.

void DUtils::Profiler::stop ( const std::string &  name = "") [inline]

Stops profiling the given item or the last one if this is not provided. Adds the elapsed time to the sum of this item profile time

Parameters:
nameitem name

Definition at line 75 of file Profiler.h.

void Profiler::stopAndScale ( double  scale,
const std::string &  name = "" 
)

Does the same as Profiler::stop, but multiplies the elapsed time by the given scale factor

Parameters:
scalestored_duration = actual_duration * scale
nameitem name

Definition at line 49 of file Profiler.cpp.


Member Data Documentation

std::string DUtils::Profiler::m_last_profile [protected]

Definition at line 90 of file Profiler.h.

std::map<std::string, std::vector<double> > DUtils::Profiler::m_profiles [protected]

Definition at line 88 of file Profiler.h.

std::map<std::string, Timestamp> DUtils::Profiler::m_start_points [protected]

Definition at line 89 of file Profiler.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:29