Classes | Public Member Functions | Private Attributes | List of all members
coil::TimeMeasure Class Reference

TimeMeasure class. More...

#include <TimeMeasure.h>

Classes

struct  Statistics
 Structure for time statistics. More...
 

Public Member Functions

unsigned long int count () const
 Get number of time measurement buffer. More...
 
bool getStatistics (double &max_interval, double &min_interval, double &mean_interval, double &stddev)
 Get total statistics. More...
 
Statistics getStatistics ()
 Get statistics result. More...
 
coil::TimeValueinterval ()
 Get a interval time. More...
 
void reset ()
 Initialize for statistics related data. More...
 
void tack ()
 Finish time measurement for time statistics. More...
 
void tick ()
 Begin time measurement for time statistics. More...
 
 TimeMeasure (int buflen=100)
 Constructor. More...
 

Private Attributes

coil::TimeValue m_begin
 
unsigned long int m_count
 
const unsigned long int m_countMax
 
unsigned long long int m_cpuClock
 
coil::TimeValue m_interval
 
std::vector< coil::TimeValuem_record
 
bool m_recurred
 

Detailed Description

TimeMeasure class.

This class is used for getting statistics of code execution time. Using get_stat you can get maximum, minimum, mean and standard deviation time for code execution.

Definition at line 49 of file TimeMeasure.h.

Constructor & Destructor Documentation

◆ TimeMeasure()

coil::TimeMeasure::TimeMeasure ( int  buflen = 100)

Constructor.

Time Statistics object for profiling.

Definition at line 41 of file TimeMeasure.cpp.

Member Function Documentation

◆ count()

unsigned long int coil::TimeMeasure::count ( ) const

Get number of time measurement buffer.

Get number of time measurement buffer.

Returns
Measurement count

Definition at line 119 of file TimeMeasure.cpp.

◆ getStatistics() [1/2]

bool coil::TimeMeasure::getStatistics ( double &  max_interval,
double &  min_interval,
double &  mean_interval,
double &  stddev 
)

Get total statistics.

Get total statistics.

Parameters
max_intervalMax value [ns]
min_intervalMin value [ns]
mean_intervalMean value [ns]
stddevStandard deviation value
Returns
true: Data found, false: Data not found

Definition at line 131 of file TimeMeasure.cpp.

◆ getStatistics() [2/2]

TimeMeasure::Statistics coil::TimeMeasure::getStatistics ( )

Get statistics result.

Get statistics result.

Returns
Statistics result

Definition at line 168 of file TimeMeasure.cpp.

◆ interval()

coil::TimeValue & coil::TimeMeasure::interval ( )

Get a interval time.

Get a interval time.

Returns
TimeValue object

Definition at line 93 of file TimeMeasure.cpp.

◆ reset()

void coil::TimeMeasure::reset ( )

Initialize for statistics related data.

Initialize for statistics related data.

Definition at line 105 of file TimeMeasure.cpp.

◆ tack()

void coil::TimeMeasure::tack ( )

Finish time measurement for time statistics.

End of time measurement for time statistics.

Definition at line 72 of file TimeMeasure.cpp.

◆ tick()

void coil::TimeMeasure::tick ( )

Begin time measurement for time statistics.

Begin time measurement for time statistics.

Definition at line 60 of file TimeMeasure.cpp.

Member Data Documentation

◆ m_begin

coil::TimeValue coil::TimeMeasure::m_begin
private

Definition at line 238 of file TimeMeasure.h.

◆ m_count

unsigned long int coil::TimeMeasure::m_count
private

Definition at line 241 of file TimeMeasure.h.

◆ m_countMax

const unsigned long int coil::TimeMeasure::m_countMax
private

Definition at line 242 of file TimeMeasure.h.

◆ m_cpuClock

unsigned long long int coil::TimeMeasure::m_cpuClock
private

Definition at line 243 of file TimeMeasure.h.

◆ m_interval

coil::TimeValue coil::TimeMeasure::m_interval
private

Definition at line 239 of file TimeMeasure.h.

◆ m_record

std::vector<coil::TimeValue> coil::TimeMeasure::m_record
private

Definition at line 237 of file TimeMeasure.h.

◆ m_recurred

bool coil::TimeMeasure::m_recurred
private

Definition at line 245 of file TimeMeasure.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:46