cisst-saw
|
#include <mtsIntervalStatistics.h>
Public Types | |
typedef unsigned long long int | TimeTicksType |
typedef mtsGenericObject | BaseType |
Public Member Functions | |
double | GetAvg (void) const |
double | GetStdDev (void) const |
double | GetMax (void) const |
double | GetMin (void) const |
double | MinComputeTime (void) const |
double | MaxComputeTime (void) const |
void | SetStatisticsUpdatePeriod (const double &time) |
double | GetStatisticsUpdatePeriod (void) const |
void | AddSample (const double sample) |
void | AddComputeTime (const double computeTime) |
mtsIntervalStatistics () | |
~mtsIntervalStatistics () | |
void | ToStream (std::ostream &outputStream) const |
void | ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const |
void | SerializeRaw (std::ostream &outputStream) const |
virtual void | DeSerializeRaw (std::istream &inputStream) |
![]() | |
mtsGenericObject (void) | |
mtsGenericObject (double timestamp, bool automaticTimestamp, bool valid) | |
mtsGenericObject (const mtsGenericObject &other) | |
virtual | ~mtsGenericObject (void) |
bool | SetTimestampIfAutomatic (double timestamp) |
virtual bool | FromStreamRaw (std::istream &inputStream, const char delimiter= ' ') |
size_t | ScalarNumber (void) const |
bool | ScalarNumberIsFixed (void) const |
double | Scalar (const size_t index) const throw (std::out_of_range) |
std::string | ScalarDescription (const size_t index, const std::string &userDescription="") const throw (std::out_of_range) |
![]() | |
virtual | ~cmnGenericObject (void) |
virtual const cmnClassServicesBase * | Services (void) const =0 |
bool | ReconstructFrom (const cmnGenericObject &other) |
std::string | ToString (void) const |
virtual cmnLogger::StreamBufType * | GetLogMultiplexer (void) const |
virtual double | Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range) |
virtual std::string | ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const |
Calculate the statistics (avg,std,min,max) on the vector of data that is added one sample at time. AddSample checks if the statistics need to be recalculated after a given period elapses (eg 1sec).
Base type
typedef unsigned long long int mtsIntervalStatistics::TimeTicksType |
TimeTicks are typedef'ed as unsigned long long (64 bits)
mtsIntervalStatistics::mtsIntervalStatistics | ( | ) |
|
inline |
void mtsIntervalStatistics::AddComputeTime | ( | const double | computeTime | ) |
void mtsIntervalStatistics::AddSample | ( | const double | sample | ) |
Add one sample to compute statistics
|
virtual |
De-serialize the content of the object without any extra information, i.e. no class type nor format version.
Reimplemented from mtsGenericObject.
|
inline |
The measured sample average.
|
inline |
The measured maximum period of the task
|
inline |
The measured task period (difference between current Tic and previous Tic).
|
inline |
Get time period between period statistics calculations
|
inline |
The measured minimum period of the task
|
inline |
Get maximum compute time.
|
inline |
Get minimum compute time.
|
virtual |
Serialize the content of the object without any extra information, i.e. no class type nor format version. The "receiver" is supposed to already know what to expect.
Reimplemented from mtsGenericObject.
|
inline |
Time period between period statistics calculations
|
virtual |
Human readable text output
Reimplemented from mtsGenericObject.
|
virtual |
Machine reabable text output
Reimplemented from mtsGenericObject.