This header-only library provides easy to use time-interval histogram creation and streaming to varios destinations(StdOut, File, Udp) in a string-format that can be drawn by feedgnuplot
Types
Measurer:
Every measurer is a class-type by its own and is used as a singleton.
It is defined by an Id and the DataHolder type.
It is used to measure the time-duration between two
time-points by its "sample() call".
DataHolder:
The Object where the measured data gets feed in(e.g. a Histogram). It has a one-to-one relation with the Measurer.
CyclicDataOutputterThread:
A Thread to output the DataHolders data in an asynchronous manner. The destination can be determined by a template parameter.
Usage
Setup DataHolder(at this time only Histograms are implemented) of the Measurers that will be used. For simplicity we will use a typedef for the Histogram class (for some predefined typedefs see TimeMeasureTypes.h)
using HistogramUs = Histogram< std::chrono::microseconds >;
TimeMeasure::Measurer< 0, HistogramUs >::instance().setHistogramRange(200);