Fawkes API Fawkes Development Version
|
This class represents call stats of a single component to a single SyncPoint. More...
#include <>>
Public Member Functions | |
SyncPointCallStats () | |
Constructor. More... | |
void | update_calls (const Time &new_call, const Time &wait_time=Time(0.f)) |
Add a call to the stats. More... | |
void | update_calls (const SyncPointCall &call) |
Add a call to the stats. More... | |
Time | get_first_call () const |
Get the first call to the SyncPoint by the component. More... | |
Time | get_last_call () const |
Get the last call to the SyncPoint by the component. More... | |
float | get_call_frequency () const |
Get the call frequency. More... | |
float | get_waittime_average () const |
Get the average wait time. More... | |
unsigned int | get_num_calls () const |
Get total number of calls. More... | |
This class represents call stats of a single component to a single SyncPoint.
It keeps track of the first and last call and computes the call frequency.
Definition at line 30 of file syncpoint_call_stats.h.
fawkes::SyncPointCallStats::SyncPointCallStats | ( | ) |
Constructor.
Definition at line 36 of file syncpoint_call_stats.cpp.
float fawkes::SyncPointCallStats::get_call_frequency | ( | ) | const |
Get the call frequency.
This is calculated using the first and last call and the number of calls
Definition at line 91 of file syncpoint_call_stats.cpp.
References fawkes::Time::in_sec().
Time fawkes::SyncPointCallStats::get_first_call | ( | ) | const |
Get the first call to the SyncPoint by the component.
Definition at line 72 of file syncpoint_call_stats.cpp.
Time fawkes::SyncPointCallStats::get_last_call | ( | ) | const |
Get the last call to the SyncPoint by the component.
Definition at line 81 of file syncpoint_call_stats.cpp.
unsigned int fawkes::SyncPointCallStats::get_num_calls | ( | ) | const |
Get total number of calls.
Definition at line 112 of file syncpoint_call_stats.cpp.
float fawkes::SyncPointCallStats::get_waittime_average | ( | ) | const |
Get the average wait time.
For emit calls, this is 0.
Definition at line 103 of file syncpoint_call_stats.cpp.
References fawkes::Time::in_sec().
void fawkes::SyncPointCallStats::update_calls | ( | const SyncPointCall & | call | ) |
Add a call to the stats.
call | the new call |
Definition at line 63 of file syncpoint_call_stats.cpp.
References fawkes::SyncPointCall::get_call_time(), fawkes::SyncPointCall::get_wait_time(), and update_calls().
void fawkes::SyncPointCallStats::update_calls | ( | const Time & | new_call, |
const Time & | wait_time = Time(0.f) |
||
) |
Add a call to the stats.
Update the first and last call and increment the call counter
new_call | the time of the call |
wait_time | the time the caller had to wait, 0 for emit() |
Definition at line 47 of file syncpoint_call_stats.cpp.
Referenced by update_calls().