iCub-main
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
Tools::Emb_RensponseTimingVerifier Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Emb_RensponseTimingVerifier()

Tools::Emb_RensponseTimingVerifier::Emb_RensponseTimingVerifier ( )

Costructor.

Definition at line 163 of file PeriodicEventsVerifier.cpp.

◆ ~Emb_RensponseTimingVerifier()

Tools::Emb_RensponseTimingVerifier::~Emb_RensponseTimingVerifier ( )

Descructor.

Definition at line 166 of file PeriodicEventsVerifier.cpp.

Member Function Documentation

◆ init()

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.

Parameters
desiredResponseTimeis the desired response period [expressed in seconds].
toleranceis the acceptable tolerance of the desired response period [expressed in seconds].
minis the minimum response period you expected [expressed in seconds].
maxis the maximum response period you expected [expressed in seconds].
stepis the step of the histogram. [expressed in seconds].
reportPeriodthe class prints the histogram every @reportPeriod seconds. [expressed in seconds].
nameused in the print of histogram
Returns
true/false on success/failure.
Note
the number of histogram columns are: ((@max-@min)/@step ) +2

Definition at line 172 of file PeriodicEventsVerifier.cpp.

◆ tick()

void Tools::Emb_RensponseTimingVerifier::tick ( double  currentResponseTime,
double  requestTime 
)

Adds the current response time to the collection of data of the object.

Parameters
currentResponseTimeis the time needed to the current request to get a response [expressed in seconds].
requestTimethe time when request has been done [expressed in seconds].

Definition at line 178 of file PeriodicEventsVerifier.cpp.


The documentation for this class was generated from the following files: