|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
One entry of the table: its live statistics and its last window. The layout is in the Registry comment.
Definition at line 65 of file registry.hpp.
#include <registry.hpp>
Public Member Functions | |
| constexpr bool | is (Kind k) const |
| True if the entry is of this kind. | |
| void | measure (uint32_t cycles) |
| Record one measurement: the count, the running average (alpha 1/128), the window's extremes. | |
| void | open_window () |
| void | close_window () |
| void | clear () |
Public Attributes | |
| uint32_t | kind = 0 |
| char | name [NAME_SIZE] = {} |
| uint32_t | count = 0 |
| float | avg = 0.0f |
| uint32_t | max = 0 |
| uint32_t | min = NO_MINIMUM |
| uint32_t | overruns = 0 |
| uint32_t | limit = 0 |
| uint32_t | window_count = 0 |
| float | window_avg = 0.0f |
| uint32_t | window_max = 0 |
| uint32_t | window_min = 0 |
| uint32_t | window_overruns = 0 |
| uint32_t | window_base = 0 |
Static Public Attributes | |
| static constexpr float | AVERAGE_ALPHA = 1.0f / 128.0f |
|
inlineconstexpr |
True if the entry is of this kind.
| k | Kind to test |
Definition at line 86 of file registry.hpp.
References kind.
|
inline |
Record one measurement: the count, the running average (alpha 1/128), the window's extremes.
| cycles | Measured cycles |
Definition at line 92 of file registry.hpp.
References AVERAGE_ALPHA, avg, count, sbl::system::profiling::cycles(), max, and min.
Referenced by sbl::system::profiling::AudioBudget::on_block_end().
|
inline |
Start a window over: the extremes and the overruns. The average and the count go on.
Definition at line 104 of file registry.hpp.
References max, min, sbl::system::profiling::NO_MINIMUM, and overruns.
Referenced by clear(), and close_window().
|
inline |
Copy the statistics into the window fields and start the next window.
Definition at line 111 of file registry.hpp.
References avg, count, max, min, sbl::system::profiling::NO_MINIMUM, open_window(), overruns, window_avg, window_base, window_count, window_max, window_min, and window_overruns.
|
inline |
Forget every statistic. The kind, the name and the limit stay.
Definition at line 122 of file registry.hpp.
References avg, count, open_window(), window_avg, window_base, window_count, window_max, window_min, and window_overruns.
| uint32_t sbl::system::profiling::Entry::kind = 0 |
| char sbl::system::profiling::Entry::name[NAME_SIZE] = {} |
NUL-terminated, 11 characters at most
Definition at line 67 of file registry.hpp.
| uint32_t sbl::system::profiling::Entry::count = 0 |
blocks, passes or events since the start
Definition at line 68 of file registry.hpp.
Referenced by clear(), close_window(), and measure().
| float sbl::system::profiling::Entry::avg = 0.0f |
running average in cycles (budget, section)
Definition at line 69 of file registry.hpp.
Referenced by clear(), close_window(), and measure().
| uint32_t sbl::system::profiling::Entry::max = 0 |
largest in the open window, in cycles
Definition at line 70 of file registry.hpp.
Referenced by close_window(), measure(), and open_window().
| uint32_t sbl::system::profiling::Entry::min = NO_MINIMUM |
smallest in the open window; NO_MINIMUM before the first
Definition at line 71 of file registry.hpp.
Referenced by close_window(), measure(), and open_window().
| uint32_t sbl::system::profiling::Entry::overruns = 0 |
budget: blocks over the limit in the open window
Definition at line 72 of file registry.hpp.
Referenced by close_window(), sbl::system::profiling::AudioBudget::on_block_end(), and open_window().
| uint32_t sbl::system::profiling::Entry::limit = 0 |
budget: cycles a block may take
Definition at line 73 of file registry.hpp.
Referenced by sbl::system::profiling::AudioBudget::on_block_end().
| uint32_t sbl::system::profiling::Entry::window_count = 0 |
blocks, passes or events in the last window
Definition at line 74 of file registry.hpp.
Referenced by clear(), and close_window().
| float sbl::system::profiling::Entry::window_avg = 0.0f |
avg when the window closed
Definition at line 75 of file registry.hpp.
Referenced by clear(), and close_window().
| uint32_t sbl::system::profiling::Entry::window_max = 0 |
max of the window; 0 if it measured nothing
Definition at line 76 of file registry.hpp.
Referenced by clear(), and close_window().
| uint32_t sbl::system::profiling::Entry::window_min = 0 |
min of the window; 0 if it measured nothing
Definition at line 77 of file registry.hpp.
Referenced by clear(), and close_window().
| uint32_t sbl::system::profiling::Entry::window_overruns = 0 |
overruns of the window
Definition at line 78 of file registry.hpp.
Referenced by clear(), and close_window().
| uint32_t sbl::system::profiling::Entry::window_base = 0 |
count when the window closed
Definition at line 79 of file registry.hpp.
Referenced by clear(), and close_window().
|
staticconstexpr |
The running average's weight for a new measurement (about 130 ms to settle at 1 ms blocks).
Definition at line 135 of file registry.hpp.
Referenced by measure().