22 #include <syncpoint/syncpoint_call_stats.h> 50 total_wait_time_ += wait_time;
51 if (new_call < first_call_) {
52 first_call_ = new_call;
54 if (new_call > last_call_) {
55 last_call_ = new_call;
93 if (num_calls_ <= 1) {
96 return num_calls_ / (last_call_.
in_sec() - first_call_.
in_sec());
105 return total_wait_time_.
in_sec() / num_calls_;
Time get_last_call() const
Get the last call to the SyncPoint by the component.
double in_sec() const
Convet time to seconds.
float get_waittime_average() const
Get the average wait time.
Fawkes library namespace.
A call (wait() or emit()) to a SyncPoint.
SyncPointCallStats()
Constructor.
A class for handling time.
Time get_call_time() const
Get the time when the call was made.
unsigned int get_num_calls() const
Get total number of calls.
const Time TIME_MIN
Instance of Time denoting the minimum value possible.
float get_call_frequency() const
Get the call frequency.
void update_calls(const Time &new_call, const Time &wait_time=Time(0.f))
Add a call to the stats.
const Time TIME_MAX
Instance of Time denoting the maximum value possible.
Time get_first_call() const
Get the first call to the SyncPoint by the component.
Time get_wait_time() const
Get the wait time.