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. | |
bool | getStatistics (double &max_interval, double &min_interval, double &mean_interval, double &stddev) |
Get total statistics. | |
Statistics | getStatistics () |
Get statistics result. | |
coil::TimeValue & | interval () |
Get a interval time. | |
void | reset () |
void | tack () |
Finish time measurement for time statistics. | |
void | tick () |
TimeMeasure (int buflen=100) | |
Constructor. | |
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::TimeValue > | m_record |
bool | m_recurred |
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.
coil::TimeMeasure::TimeMeasure | ( | int | buflen = 100 | ) |
unsigned long int coil::TimeMeasure::count | ( | ) | const |
Get number of time measurement buffer.
Get number of time measurement buffer.
Definition at line 119 of file TimeMeasure.cpp.
bool coil::TimeMeasure::getStatistics | ( | double & | max_interval, |
double & | min_interval, | ||
double & | mean_interval, | ||
double & | stddev | ||
) |
Get total statistics.
Get total statistics.
max_interval | Max value [ns] |
min_interval | Min value [ns] |
mean_interval | Mean value [ns] |
stddev | Standard deviation value |
Definition at line 131 of file TimeMeasure.cpp.
Get statistics result.
Get statistics result.
Definition at line 168 of file TimeMeasure.cpp.
Get a interval time.
Get a interval time.
Definition at line 93 of file TimeMeasure.cpp.
void coil::TimeMeasure::reset | ( | ) |
Initialize for statistics related data.
Definition at line 105 of file TimeMeasure.cpp.
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.
void coil::TimeMeasure::tick | ( | ) |
Begin time measurement for time statistics.
Definition at line 60 of file TimeMeasure.cpp.
coil::TimeValue coil::TimeMeasure::m_begin [private] |
Definition at line 238 of file TimeMeasure.h.
unsigned long int coil::TimeMeasure::m_count [private] |
Definition at line 241 of file TimeMeasure.h.
const unsigned long int coil::TimeMeasure::m_countMax [private] |
Definition at line 242 of file TimeMeasure.h.
unsigned long long int coil::TimeMeasure::m_cpuClock [private] |
Definition at line 243 of file TimeMeasure.h.
coil::TimeValue coil::TimeMeasure::m_interval [private] |
Definition at line 239 of file TimeMeasure.h.
std::vector<coil::TimeValue> coil::TimeMeasure::m_record [private] |
Definition at line 237 of file TimeMeasure.h.
bool coil::TimeMeasure::m_recurred [private] |
Definition at line 245 of file TimeMeasure.h.