iCub-main
|
Tools::Emb_RensponseTimingVerifier. More...
#include <PeriodicEventsVerifier.h>
Classes | |
struct | Impl |
Public Member Functions | |
Emb_RensponseTimingVerifier () | |
Costructor. | |
~Emb_RensponseTimingVerifier () | |
Descructor. | |
bool | init (double desiredResponseTime, double tolerance, double min, double max, double step, double reportPeriod, const std::string &name={}) |
Initializes the object with custom parameters. | |
void | tick (double currentResponseTime, double requestTime) |
Adds the current response time to the collection of data of the object. | |
Tools::Emb_RensponseTimingVerifier.
This class let you to analyze the needed time of a request to get a response during a given amount of time. This class has been developed with the idea in mind of monitoring the the response time of a request along a period in order to understand how many situations there are jitter, other than to calculate the medium value. This class needs to be initialize and then you need to add the current response time and its relative absolute request time. The class prints the histogram of real response timing every @reportPeriod, by yarp logger mechanism and resets the data collected until now.
Definition at line 96 of file PeriodicEventsVerifier.h.
Tools::Emb_RensponseTimingVerifier::Emb_RensponseTimingVerifier | ( | ) |
Costructor.
Definition at line 163 of file PeriodicEventsVerifier.cpp.
Tools::Emb_RensponseTimingVerifier::~Emb_RensponseTimingVerifier | ( | ) |
Descructor.
Definition at line 166 of file PeriodicEventsVerifier.cpp.
bool Tools::Emb_RensponseTimingVerifier::init | ( | double | desiredResponseTime, |
double | tolerance, | ||
double | min, | ||
double | max, | ||
double | step, | ||
double | reportPeriod, | ||
const std::string & | name = {} |
||
) |
Initializes the object with custom parameters.
desiredResponseTime | is the desired response period [expressed in seconds]. |
tolerance | is the acceptable tolerance of the desired response period [expressed in seconds]. |
min | is the minimum response period you expected [expressed in seconds]. |
max | is the maximum response period you expected [expressed in seconds]. |
step | is the step of the histogram. [expressed in seconds]. |
reportPeriod | the class prints the histogram every @reportPeriod seconds. [expressed in seconds]. |
name | used in the print of histogram |
Definition at line 172 of file PeriodicEventsVerifier.cpp.
void Tools::Emb_RensponseTimingVerifier::tick | ( | double | currentResponseTime, |
double | requestTime | ||
) |
Adds the current response time to the collection of data of the object.
currentResponseTime | is the time needed to the current request to get a response [expressed in seconds]. |
requestTime | the time when request has been done [expressed in seconds]. |
Definition at line 178 of file PeriodicEventsVerifier.cpp.