Device for conveniently storing and analysing benchmarking times. More...
#include <time_data.hpp>
Public Member Functions | |
ecl::Duration | average () const |
Return the average of the elements currently stored. | |
void | clear () |
Reset the container (i.e. clear it). | |
void | push_back (const ecl::Duration &duration) |
Append a new timing measurement to the sequence. | |
ecl::Duration | stdDev () const |
Return the standard deviation of the elements currently stored. | |
ecl::Duration | variance () const |
Return the variance of the elements currently stored. | |
Private Attributes | |
std::vector< ecl::Duration > | durations |
Device for conveniently storing and analysing benchmarking times.
This serves as both a container and interface for generating statistics on a sequence of timings.
Definition at line 39 of file time_data.hpp.
ecl::Duration ecl::TimeData::average | ( | ) | const |
Return the average of the elements currently stored.
Definition at line 26 of file lib/time_data.cpp.
void ecl::TimeData::clear | ( | ) | [inline] |
Reset the container (i.e. clear it).
Definition at line 53 of file time_data.hpp.
void ecl::TimeData::push_back | ( | const ecl::Duration & | duration | ) | [inline] |
Append a new timing measurement to the sequence.
duration | : measurement to be added. |
Definition at line 49 of file time_data.hpp.
ecl::Duration ecl::TimeData::stdDev | ( | ) | const |
Return the standard deviation of the elements currently stored.
Definition at line 34 of file lib/time_data.cpp.
ecl::Duration ecl::TimeData::variance | ( | ) | const |
Return the variance of the elements currently stored.
Definition at line 44 of file lib/time_data.cpp.
std::vector<ecl::Duration> ecl::TimeData::durations [private] |
Definition at line 75 of file time_data.hpp.