DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
dueca::TimingCheck Class Reference

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
 

Detailed Description

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:

{ "check-timing",
(&SpacePlane::checkTiming)},
This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd...
Definition StreamReaderLatest.hxx:43

Add the new call to your class declaration, and add the following implementation:

bool SpacePlane::checkTiming(const vector<int>& i)
{
if (i.size() == 3) {
new TimingCheck(do_step, i[0], i[1], i[2]);
}
else if (i.size() == 2) {
new TimingCheck(do_step, i[0], i[1]);
}
else {
return false;
}
return true;
}
TimingCheck(Activity &act, int warning_limit, int critical_limit, int nloops=2000)
Constructor.

This code will be generated automatically if you use the "newModule" script to generate a framework for a module.

Constructor & Destructor Documentation

◆ TimingCheck()

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.

Parameters
actReference to the activity that has to be checked.
warning_limitLimit, in microseconds, for counting a warning about timing.
critical_limitin microseconds, for counting timing as too late.
nloopsnumber of loops before log.

Member Function Documentation

◆ userReportsAnomaly()

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.


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