12 #ifndef ROC_AUDIO_PROFILER_H_
13 #define ROC_AUDIO_PROFILER_H_
90 const size_t chunk_length_;
91 const size_t num_chunks_;
93 size_t first_chunk_num_;
94 size_t last_chunk_num_;
95 size_t last_chunk_samples_;
Profiler The role of the profiler is to report the average processing speed (# of samples processed p...
void add_frame(packet::stream_timestamp_t frame_duration, core::nanoseconds_t elapsed)
Profile frame speed.
Profiler(core::IArena &arena, const SampleSpec &sample_spec, ProfilerConfig profiler_config)
Initialization.
bool is_valid() const
Check if the profiler was succefully constructed.
float get_moving_avg()
Get computed average.
Sample specification. Describes sample rate and channels.
Base class for non-copyable objects.
Intrusive doubly-linked list.
const nanoseconds_t Millisecond
One millisecond represented in nanoseconds.
const nanoseconds_t Second
One second represented in nanoseconds.
int64_t nanoseconds_t
Nanoseconds.
uint32_t stream_timestamp_t
Packet stream timestamp.
Profiler Configuration Parameters. Controls profiling interval and duration of each circular buffer c...
core::nanoseconds_t chunk_duration
Duration of samples each chunk can hold in the circular buffer.
ProfilerConfig()
Default Initialization.
ProfilerConfig(core::nanoseconds_t interval, core::nanoseconds_t duration)
Override Initialization.
core::nanoseconds_t profiling_interval
Rolling window duration and reporting interval.
Various units used in packets.