|
code_profiler
|
#include <loop_timer.h>
Public Member Functions | |
| long unsigned int | getIterationCount () const |
| Get total number of loop iterations. When running, the current iteration is included. More... | |
| long double | getTotalTime () const |
| Get the total elapsed time since the first start.Stops the current iteration when running. More... | |
| LoopTimer () | |
| void | reset () |
| Stop the timer and reset all counters to zero. More... | |
| void | start () |
| void | stop () |
| ~LoopTimer ()=default | |
| long double | getTotalLoopTime () |
| Get total elapsed time during the loops. Stops the current iteration when running. More... | |
| long double | getTotalLoopTime () const |
| const version which excludes the current loop iteration when running More... | |
| long double | getAverageLoopTime () |
| Get average time per loop iteration. Stops the current iteration when running. More... | |
| long double | getAverageLoopTime () const |
| const version which excludes the current loop iteration when running More... | |
| double | getLoopUsagePercentage () |
| Get average percentage of total time used by the loop. More... | |
| double | getLoopUsagePercentage () const |
| const version which excludes the current loop iteration when running More... | |
Private Attributes | |
| long double | c_ |
| Compensation for lost low-order bits. More... | |
| long unsigned int | counts_ |
| loop counter More... | |
| long double | sum_ |
| Sum so far. More... | |
| tue::Timer | timer_ |
| tue::Timer | total_timer_ |
Definition at line 11 of file loop_timer.h.
| tue::LoopTimer::LoopTimer | ( | ) |
Definition at line 9 of file loop_timer.cpp.
|
default |
| long double tue::LoopTimer::getAverageLoopTime | ( | ) |
Get average time per loop iteration. Stops the current iteration when running.
Definition at line 56 of file loop_timer.cpp.
| long double tue::LoopTimer::getAverageLoopTime | ( | ) | const |
const version which excludes the current loop iteration when running
|
inline |
Get total number of loop iterations. When running, the current iteration is included.
Definition at line 48 of file loop_timer.h.
| double tue::LoopTimer::getLoopUsagePercentage | ( | ) |
Get average percentage of total time used by the loop.
Definition at line 78 of file loop_timer.cpp.
| double tue::LoopTimer::getLoopUsagePercentage | ( | ) | const |
const version which excludes the current loop iteration when running
| long double tue::LoopTimer::getTotalLoopTime | ( | ) |
Get total elapsed time during the loops. Stops the current iteration when running.
Definition at line 40 of file loop_timer.cpp.
| long double tue::LoopTimer::getTotalLoopTime | ( | ) | const |
const version which excludes the current loop iteration when running
| long double tue::LoopTimer::getTotalTime | ( | ) | const |
Get the total elapsed time since the first start.Stops the current iteration when running.
Definition at line 73 of file loop_timer.cpp.
| void tue::LoopTimer::reset | ( | ) |
Stop the timer and reset all counters to zero.
Definition at line 31 of file loop_timer.cpp.
| void tue::LoopTimer::start | ( | ) |
Definition at line 13 of file loop_timer.cpp.
| void tue::LoopTimer::stop | ( | ) |
Definition at line 21 of file loop_timer.cpp.
|
private |
Compensation for lost low-order bits.
Definition at line 30 of file loop_timer.h.
|
private |
loop counter
Definition at line 20 of file loop_timer.h.
|
private |
Sum so far.
Definition at line 25 of file loop_timer.h.
|
private |
Definition at line 14 of file loop_timer.h.
|
private |
Definition at line 15 of file loop_timer.h.
1.8.17