#include <monitor.h>
Inheritance diagram for Monitor:
Public Member Functions | |
const double | averageThroughput () |
const double | elapsedTime () |
const uint | elementsProcessed () |
void | resetPlungerMemory () |
const uint | samplesProcessed () |
const double | signalProcessed () |
const double | timesFasterThanReal () |
void | waitForPlunger () |
It also has a couple of methods allowing the developer to block based on waiting for plungers, meaning they can be counted or otherwise acted upon.
const double Monitor::averageThroughput | ( | ) | [inline] |
Determine the realtime throughput.
const double Monitor::elapsedTime | ( | ) | [inline] |
const uint Monitor::elementsProcessed | ( | ) | [inline] |
Determine the number of (32-bit) elements that flowed through this object.
const uint Monitor::samplesProcessed | ( | ) | [inline] |
Determine the number of samples that flowed through this object.
const double Monitor::signalProcessed | ( | ) | [inline] |
Determine the total amount of signal time to flow through this object.
const double Monitor::timesFasterThanReal | ( | ) | [inline] |
Determine how many times faster than realtime the signal flowed through this object. If the signal is flowing through in real time (e.g. because the source of the network is realtime-based) then this should be very close to 1.0.
void Monitor::waitForPlunger | ( | ) |
Block until a plunger flows through this object. If a plunger has already flowed through that hasn't itself been waited for explicity, exit immediately. If you don't want this to happen, then call resetPlungerMemory() first.
Typically used in a basic for() loop to count until the required number of plungers has passed through the network.
void Monitor::resetPlungerMemory | ( | ) |
Any plungers that have flowed through previously will be instantly forgotten. waitForPlunger will only exit for plungers delivered after this call.