Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::profiler::FlightRecorder< Capacity > Class Template Reference

Zero-heap circular flight recorder storing the last N event telemetry records. Thread-safe for multiple producers and concurrent reader/dumping. More...

#include <FlightRecorder.hpp>

+ Inheritance diagram for corium::profiler::FlightRecorder< Capacity >:
+ Collaboration diagram for corium::profiler::FlightRecorder< Capacity >:

Public Member Functions

constexpr std::size_t capacity () const noexcept
 Get buffer capacity.
 
void exportChromeTracingJson (std::ostream &os) const
 Export recorded flight logs in Chrome Tracing JSON format (supported by chrome://tracing and Perfetto UI).
 
 FlightRecorder ()=default
 
template<typename Callback >
void forEach (Callback &&cb) const
 Iterate through available historical records in chronological order.
 
void record (std::size_t eventTypeId, const char *eventName, uint64_t postTimeNs, uint64_t dispatchTimeNs, uint64_t finishTimeNs, uint8_t priority) noexcept
 Record a completed event execution into the circular buffer.
 
FlightRecord recordAt (std::size_t index) const noexcept
 Read a record by logical historical index (0 is oldest available in current window).
 
uint64_t totalRecorded () const noexcept
 Get total number of recorded events since creation.
 

Detailed Description

template<std::size_t Capacity = 256>
class corium::profiler::FlightRecorder< Capacity >

Zero-heap circular flight recorder storing the last N event telemetry records. Thread-safe for multiple producers and concurrent reader/dumping.

Template Parameters
CapacityNumber of flight records (power of 2).

Constructor & Destructor Documentation

◆ FlightRecorder()

template<std::size_t Capacity = 256>
corium::profiler::FlightRecorder< Capacity >::FlightRecorder ( )
default

Member Function Documentation

◆ capacity()

template<std::size_t Capacity = 256>
constexpr std::size_t corium::profiler::FlightRecorder< Capacity >::capacity ( ) const
inlineconstexprnoexcept

Get buffer capacity.

◆ exportChromeTracingJson()

template<std::size_t Capacity = 256>
void corium::profiler::FlightRecorder< Capacity >::exportChromeTracingJson ( std::ostream &  os) const
inline

Export recorded flight logs in Chrome Tracing JSON format (supported by chrome://tracing and Perfetto UI).

+ Here is the call graph for this function:

◆ forEach()

template<std::size_t Capacity = 256>
template<typename Callback >
void corium::profiler::FlightRecorder< Capacity >::forEach ( Callback &&  cb) const
inline

Iterate through available historical records in chronological order.

+ Here is the caller graph for this function:

◆ record()

template<std::size_t Capacity = 256>
void corium::profiler::FlightRecorder< Capacity >::record ( std::size_t  eventTypeId,
const char *  eventName,
uint64_t  postTimeNs,
uint64_t  dispatchTimeNs,
uint64_t  finishTimeNs,
uint8_t  priority 
)
inlinenoexcept

Record a completed event execution into the circular buffer.

◆ recordAt()

template<std::size_t Capacity = 256>
FlightRecord corium::profiler::FlightRecorder< Capacity >::recordAt ( std::size_t  index) const
inlinenoexcept

Read a record by logical historical index (0 is oldest available in current window).

◆ totalRecorded()

template<std::size_t Capacity = 256>
uint64_t corium::profiler::FlightRecorder< Capacity >::totalRecorded ( ) const
inlinenoexcept

Get total number of recorded events since creation.


The documentation for this class was generated from the following file: