Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
counter.hpp File Reference

An event counter for the profiling registry. More...

Detailed Description

An event counter for the profiling registry.

Counts events whose cost a cycle average hides: an edge or a correction, a frame that took a slower path. A registered counter is an entry of the registry (registry.hpp): its total since the start and its count in the last window.

Gated behind SBL_PROFILING_ENABLED. Without it the class is empty and its methods compile to nothing.

Usage:

edges.register_as("edges"); // at startup
if (crossed) {
edges.add(); // in the measured code
}

Definition in file counter.hpp.

#include <cstdint>
#include <sbl/system/profiling/registry.hpp>

Go to the source code of this file.

Classes

class  sbl::system::profiling::Counter
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::system
 The system layer: execution levels, the control critical section, ring buffers, assertions and the fault handler, profiling, and the port contracts.
 
namespace  sbl::system::profiling
 Profiling: the cycle counter, the audio budget, section profiles and reports.