DUECA/DUSIME
|
A TimingCheck object monitors the timing of a certain Activity. More...
#include <TimingCheck.hxx>
Public Member Functions | |
TimingCheck (Activity &act, int warning_limit, int critical_limit, int nloops=2000) | |
Constructor. | |
~TimingCheck () | |
Destructor. | |
void | userReportsAnomaly () |
Report a user timing anomaly. | |
Friends | |
class | Activity |
A TimingCheck object monitors the timing of a certain Activity.
Start of the activity invocation and the end of the invocation is compared to the "real" time in a node, and an average, minimum and maximum count is recorded, as well as the number of delays beyond a warning limit and beyond a critical limit.
A TimingCheck can be added to an Activity by creating one with the activity as an argument. Results from the check are assembled and sent over a channel, and made accessible by the (single) TimingView object that exists in a DUECA process.
The most flexible method is adding a TimingCheck option to the configuration of your module. In the ParameterTable add:
Add the new call to your class declaration, and add the following implementation:
This code will be generated automatically if you use the "newModule" script to generate a framework for a module.
dueca::TimingCheck::TimingCheck | ( | Activity & | act, |
int | warning_limit, | ||
int | critical_limit, | ||
int | nloops = 2000 ) |
Constructor.
A timingcheck can monitor a single activity's timing delays. It is constructed with a reference to the activity that needs to be monitored, and from there, it can access necessary data.
act | Reference to the activity that has to be checked. |
warning_limit | Limit, in microseconds, for counting a warning about timing. |
critical_limit | in microseconds, for counting timing as too late. |
nloops | number of loops before log. |
void dueca::TimingCheck::userReportsAnomaly | ( | ) |
Report a user timing anomaly.
This is the only other call available to the user, it acts as a single counter for timing anomalies. For example, if you are triggered on the ticker, and the data is not available, use this anomaly counter.