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::TimeValue & | interval () |
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::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.
TimeMeasure::Statistics coil::TimeMeasure::getStatistics | ( | ) |
Get statistics result.
Get statistics result.
Definition at line 168 of file TimeMeasure.cpp.
coil::TimeValue & coil::TimeMeasure::interval | ( | ) |
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.
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.
Begin time measurement for time statistics.
Definition at line 60 of file TimeMeasure.cpp.
|
private |
Definition at line 238 of file TimeMeasure.h.
|
private |
Definition at line 241 of file TimeMeasure.h.
|
private |
Definition at line 242 of file TimeMeasure.h.
|
private |
Definition at line 243 of file TimeMeasure.h.
|
private |
Definition at line 239 of file TimeMeasure.h.
|
private |
Definition at line 237 of file TimeMeasure.h.
|
private |
Definition at line 245 of file TimeMeasure.h.