JeVois Smart Embedded Machine Vision Toolkit
Simple profiler class.
This class reports the time spent between start() and each of the checkpoint() calls, separately computed for each checkpoint string, at specified intervals. Because JeVois modules typically work at video rates, this class only reports the average time after some number of iterations through the start(), checkpoint(), and stop(). Thus, even if the time between two checkpoints is only a few microseconds, by reporting it only every 100 frames one will not slow down the overall framerate too much. See Timer for a lighter class with only start() and stop().
|Profiler (char const *prefix, size_t interval=100, int loglevel=LOG_INFO)|
|Start a time measurement period. More...|
|void||checkpoint (char const *description)|
|Note the time for a particular event. More...|
|End a time measurement period, report time spent for each checkpoint if reporting interval is reached. More...|
|jevois::Profiler::Profiler||(||char const *||prefix,|
|void jevois::Profiler::checkpoint||(||char const *||description||)|
Note the time for a particular event.
The delta time between this event and the previous one (or start() for the first checkpoint) will be reported. Note that we create a new unique entry in our tables for each description value, so you should keep the number of unique descriptions passed small (do not include a frame number or some parameter value). The description is passed as a raw C string to encourage you to just use a string literal for it.