Agora
1.2.0
Agora project
|
Go to the documentation of this file.
5 #ifndef TIME_FRAME_COUNTERS_H_
6 #define TIME_FRAME_COUNTERS_H_
19 inline void Init(
size_t max_symbol_count,
size_t max_task_count = 0) {
25 const size_t frame_idx = frame_id %
kFrameWnd;
30 const size_t frame_idx = frame_id %
kFrameWnd;
37 const size_t frame_idx = frame_id %
kFrameWnd;
42 const size_t frame_idx = frame_id %
kFrameWnd;
49 const size_t frame_idx = frame_id %
kFrameWnd;
54 const size_t frame_idx = frame_id %
kFrameWnd;
60 const size_t frame_idx = frame_id %
kFrameWnd;
61 return (
task_times_.at(frame_idx).at(symbol_id).second -
66 const size_t frame_idx = frame_id %
kFrameWnd;
73 const size_t frame_idx = frame_id %
kFrameWnd;
74 return task_times_.at(frame_idx).at(symbol_id).first;
77 const size_t frame_idx = frame_id %
kFrameWnd;
82 const size_t frame_idx = frame_id %
kFrameWnd;
83 return task_times_.at(frame_idx).at(symbol_id).second;
86 const size_t frame_idx = frame_id %
kFrameWnd;
98 #endif // TIME_FRAME_COUNTERS_H_
static constexpr size_t kFrameWnd
Definition: symbols.h:18
static double GetTimeUs()
Definition: gettime.h:14
double GetTaskStartTimeUs(size_t frame_id) const
Definition: time_frame_counters.h:76
bool CompleteTask(size_t frame_id, size_t symbol_id)
Increments the task count for input frame and symbol.
Definition: message.h:383
bool CompleteTask(size_t frame_id)
Definition: time_frame_counters.h:47
std::array< std::array< std::pair< double, double >, kMaxSymbols >, kFrameWnd > task_times_
Definition: time_frame_counters.h:94
bool CompleteSymbol(size_t frame_id)
Definition: time_frame_counters.h:23
double GetTaskEndTimeUs(size_t frame_id) const
Definition: time_frame_counters.h:85
This class stores the counters corresponding to a frame. Specifically, it contains a) the number of s...
Definition: message.h:349
size_t GetTaskCount(size_t frame_id) const
Definition: message.h:458
TimeFrameCounters()=default
FrameCounters counter_
Definition: time_frame_counters.h:88
double GetTaskTotalTimeMs(size_t frame_id, size_t symbol_id) const
Definition: time_frame_counters.h:59
Self defined functions for message storage and passing.
Definition: time_frame_counters.h:15
void Reset(size_t frame_id)
Definition: time_frame_counters.h:22
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: message.h:353
double GetTaskTotalTimeMs(size_t frame_id) const
Definition: time_frame_counters.h:65
double GetTaskEndTimeUs(size_t frame_id, size_t symbol_id) const
Definition: time_frame_counters.h:81
bool CompleteTask(size_t frame_id, size_t symbol_id)
Definition: time_frame_counters.h:35
void Reset(size_t frame_id)
Definition: message.h:362
double GetTaskStartTimeUs(size_t frame_id, size_t symbol_id) const
Definition: time_frame_counters.h:72
void Init(size_t max_symbol_count, size_t max_task_count=0)
Definition: time_frame_counters.h:19
size_t GetSymbolCount(size_t frame_id) const
Definition: message.h:454
static constexpr size_t kMaxSymbols
Definition: symbols.h:280
bool CompleteSymbol(size_t frame_id)
Increments and checks the symbol count for input frame.
Definition: message.h:372
std::array< std::pair< double, double >, kMaxSymbols > symbol_times_
Definition: time_frame_counters.h:95