Fawkes API Fawkes Development Version
fawkes::SyncPointCallStats Class Reference

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...
 

Detailed Description

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.

See also
SyncPoint
SyncPointCall

Definition at line 30 of file syncpoint_call_stats.h.

Constructor & Destructor Documentation

◆ SyncPointCallStats()

fawkes::SyncPointCallStats::SyncPointCallStats ( )

Constructor.

Definition at line 36 of file syncpoint_call_stats.cpp.

Member Function Documentation

◆ get_call_frequency()

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

Returns
the call frequency

Definition at line 91 of file syncpoint_call_stats.cpp.

References fawkes::Time::in_sec().

◆ get_first_call()

Time fawkes::SyncPointCallStats::get_first_call ( ) const

Get the first call to the SyncPoint by the component.

Returns
The time of the first call

Definition at line 72 of file syncpoint_call_stats.cpp.

◆ get_last_call()

Time fawkes::SyncPointCallStats::get_last_call ( ) const

Get the last call to the SyncPoint by the component.

Returns
The time of the last call

Definition at line 81 of file syncpoint_call_stats.cpp.

◆ get_num_calls()

unsigned int fawkes::SyncPointCallStats::get_num_calls ( ) const

Get total number of calls.

Returns
the total number of calls

Definition at line 112 of file syncpoint_call_stats.cpp.

◆ get_waittime_average()

float fawkes::SyncPointCallStats::get_waittime_average ( ) const

Get the average wait time.

For emit calls, this is 0.

Returns
average wait time

Definition at line 103 of file syncpoint_call_stats.cpp.

References fawkes::Time::in_sec().

◆ update_calls() [1/2]

void fawkes::SyncPointCallStats::update_calls ( const SyncPointCall call)

Add a call to the stats.

Parameters
callthe 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().

◆ update_calls() [2/2]

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

Parameters
new_callthe time of the call
wait_timethe time the caller had to wait, 0 for emit()

Definition at line 47 of file syncpoint_call_stats.cpp.

Referenced by update_calls().


The documentation for this class was generated from the following files: