The store. One producer (audio thread) and one consumer (drain/owner thread).
More...
#include <live_dsp_telemetry.hpp>
The store. One producer (audio thread) and one consumer (drain/owner thread).
◆ LiveDspTelemetryStore()
| pulp::audio::LiveDspTelemetryStore::LiveDspTelemetryStore |
( |
| ) |
|
|
default |
◆ begin_block()
AUDIO THREAD.
Begin a block. Returns an inactive writer if disabled, not prepared, or the ring is full (increments blocks_dropped).
◆ blocks_dropped()
| std::uint64_t pulp::audio::LiveDspTelemetryStore::blocks_dropped |
( |
| ) |
const |
|
inlinenoexcept |
◆ blocks_written()
| std::uint64_t pulp::audio::LiveDspTelemetryStore::blocks_written |
( |
| ) |
const |
|
inlinenoexcept |
◆ drain()
| void pulp::audio::LiveDspTelemetryStore::drain |
( |
| ) |
|
|
noexcept |
NON-RT.
Consume all complete block records, update rolling windows, compute percentiles/jitter/attribution, and republish the snapshot.
◆ enabled()
| bool pulp::audio::LiveDspTelemetryStore::enabled |
( |
| ) |
const |
|
inlinenoexcept |
◆ external_record_scratch()
| std::int64_t * pulp::audio::LiveDspTelemetryStore::external_record_scratch |
( |
| ) |
|
|
inlinenoexcept |
AUDIO THREAD.
A pre-allocated node_count()-sized scratch for the caller to fill with per-node elapsed values before calling inject_block() over it — so a recording site needs no stack VLA and no allocation. Returns nullptr when not prepared. The buffer is owned by the store and reused each block.
◆ inject_block()
| void pulp::audio::LiveDspTelemetryStore::inject_block |
( |
std::span< const std::int64_t > | node_ns, |
|
|
std::int64_t | graph_elapsed_ns, |
|
|
std::uint32_t | frame_count, |
|
|
double | sample_rate, |
|
|
std::span< const LiveDspSpectralDiagnostic > | spectral = {} ) |
|
noexcept |
AUDIO THREAD (or replay).
Feed a complete block record with explicit per-node elapsed times, taking the same ring path as begin_block() + node scopes + finish(). RT-safe: no allocation, no locks, drop-on-full. Entries in node_ns beyond node_count() are ignored; missing nodes default to 0. Used both for path-agnostic recording from externally measured per-node timings (e.g. the graph's persistent load measurers, which cover every execution path) and for deterministic tests / replay.
◆ latest()
NON-RT, single reader. The latest published snapshot.
◆ node_count()
| std::uint32_t pulp::audio::LiveDspTelemetryStore::node_count |
( |
| ) |
const |
|
inlinenoexcept |
◆ prepare()
Allocate all storage for nodes.size() nodes and the ring.
Control thread only. Returns false on an empty node set or invalid config. Re-preparing resets all state.
◆ prepared()
| bool pulp::audio::LiveDspTelemetryStore::prepared |
( |
| ) |
const |
|
inlinenoexcept |
◆ set_enabled()
| void pulp::audio::LiveDspTelemetryStore::set_enabled |
( |
bool | enabled | ) |
|
|
inlinenoexcept |
◆ spectral_scratch()
◆ LiveDspTelemetryBlockWriter
| friend class LiveDspTelemetryBlockWriter |
|
friend |
◆ LiveDspTelemetryNodeScope
| friend class LiveDspTelemetryNodeScope |
|
friend |
The documentation for this class was generated from the following file: