![]() |
fpmas 1.6
|
#include <perf.h>
Public Member Functions | |
Probe (std::string label) | |
Probe (std::string label, std::function< bool()> condition) | |
std::string | label () const override |
std::vector< Duration > & | durations () override |
const std::vector< Duration > & | durations () const override |
void | start () override |
void | stop () override |
virtual std::string | label () const =0 |
virtual std::vector< Duration > & | durations ()=0 |
virtual const std::vector< Duration > & | durations () const =0 |
virtual void | start ()=0 |
virtual void | stop ()=0 |
fpmas::api::utils::perf::Probe implementation.
|
inline |
Probe constructor.
label | probe label |
|
inline |
Conditionnal probe constructor.
When start() is called, the probe effectively perform a measure if the condition
is true. Notice that even if condition
is false, stop() still must be called, even if it has no visible effect.
Even if any std::function can be provided, it might be useful to use lambda functions to easily define conditions.
|
inlineoverridevirtual |
Label associated to measured data.
Notice that it is allowed to have several Probes associated to the same label.
Implements fpmas::api::utils::perf::Probe.
|
inlineoverridevirtual |
Returns a reference to durations currently buffered within this probe.
Since a reference is returned, the buffer can eventually be cleared by an external process.
Implements fpmas::api::utils::perf::Probe.
|
inlineoverridevirtual |
Returns a reference to durations currently buffered within this probe.
Implements fpmas::api::utils::perf::Probe.
|
overridevirtual |
Starts a duration measurement with this probe.
Implements fpmas::api::utils::perf::Probe.
|
overridevirtual |
Stops a duration measurement, previously started with start().
The duration between start() and end() calls is added to durations().
Implements fpmas::api::utils::perf::Probe.