|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Diagnostics and profiling. More...
Diagnostics and profiling.
Classes | |
| class | AudioBudget |
| class | AudioCapture |
| struct | NamedSection |
| struct | SectionProfile |
| struct | TickScope |
Functions | |
| int | format_report (char *buf, size_t size, const AudioBudget &budget, const NamedSection *sections, size_t n) |
| Format a profiling report into a buffer. | |
| int | format_tagged_report (char *buf, size_t size, const AudioBudget &budget, const NamedSection *sections, size_t n) |
| Format profiling data as tagged output lines. | |
| int | format_tagged_histogram (char *buf, size_t size, const AudioBudget &budget) |
| Format CPU load histogram as a tagged output line. | |
| void | ticks_init () |
| Initialize the platform timing backend. Call once at startup. | |
| uint32_t | ticks () |
| Read current tick count (free-running, wraps at 2^32). | |
| constexpr uint32_t | tick_rate () |
| Tick rate in Hz (ticks per second). | |
|
inline |
Format a profiling report into a buffer.
| buf | Output buffer |
| size | Buffer size |
| budget | AudioBudget instance |
| sections | Array of named section profiles |
| n | Number of sections |
Definition at line 57 of file report.hpp.
References sbl::diagnostics::AudioBudget::avg_load(), sbl::log::format(), sbl::diagnostics::AudioBudget::overruns(), and sbl::diagnostics::AudioBudget::peak_load().
|
inline |
Format profiling data as tagged output lines.
Emits one #PROF summary line followed by one #PROF.<NAME> line per section. Section names are uppercased in the tag (e.g., "osc" → #PROF.OSC).
Definition at line 109 of file report.hpp.
References sbl::diagnostics::AudioBudget::avg_load(), sbl::diagnostics::AudioBudget::count(), sbl::log::format(), sbl::diagnostics::AudioBudget::min_load(), sbl::diagnostics::AudioBudget::overruns(), and sbl::diagnostics::AudioBudget::peak_load().
|
inline |
Format CPU load histogram as a tagged output line.
Emits a single #HIST line with 11 bucket counts (10% each, last is >100%).
Definition at line 145 of file report.hpp.
References sbl::log::format(), sbl::diagnostics::AudioBudget::hist_bucket(), and sbl::diagnostics::AudioBudget::hist_size().
|
inline |
|
inline |
Read current tick count (free-running, wraps at 2^32).
Definition at line 29 of file ticks.hpp.
Referenced by sbl::diagnostics::AudioBudget::on_block_end(), sbl::diagnostics::AudioBudget::on_block_start(), and sbl::diagnostics::TickScope::~TickScope().
|
inlineconstexpr |
Tick rate in Hz (ticks per second).
Definition at line 32 of file ticks.hpp.
Referenced by sbl::diagnostics::AudioBudget::init().