Real-time event latency and performance statistics tracker. Zero dynamic memory allocation. Tracks min, max, total queue latency and handler duration.
More...
#include <ProfilerPolicies.hpp>
|
| double | averageExecutionDurationUs () const noexcept |
| | Average handler execution duration in microseconds.
|
| |
| double | averageQueueLatencyUs () const noexcept |
| | Average queue latency in microseconds.
|
| |
| void | disable () noexcept |
| | Disable runtime profiling.
|
| |
| void | enable () noexcept |
| | Enable runtime profiling.
|
| |
| bool | isEnabled () const noexcept |
| | Check if runtime profiling is enabled.
|
| |
| | LatencyTracker () noexcept=default |
| |
| double | maxExecutionDurationUs () const noexcept |
| | Maximum handler execution duration in microseconds.
|
| |
| double | maxQueueLatencyUs () const noexcept |
| | Maximum queue latency in microseconds.
|
| |
| double | minQueueLatencyUs () const noexcept |
| | Minimum queue latency in microseconds.
|
| |
| template<typename EventVariant > |
| void | onEventDispatched (const EventVariant &, uint8_t, uint64_t postTimeNs, uint64_t dispatchTimeNs, uint64_t finishTimeNs) noexcept |
| |
| template<typename EventVariant > |
| void | onEventPosted (const EventVariant &, uint8_t) noexcept |
| |
| void | recordPostTime (uint64_t postNs) noexcept |
| | Record the wall-clock post timestamp for the event being pushed now. Called by EventBus::post() immediately after the event enters the queue.
|
| |
| void | resetStats () noexcept |
| | Reset all accumulated statistics.
|
| |
| void | setEnabled (bool enabled) noexcept |
| | Enable or disable runtime latency profiling.
|
| |
| uint64_t | takePostTime () noexcept |
| | Pop and return the oldest post timestamp (called at dispatch time by EventBus).
|
| |
| uint64_t | totalDispatched () const noexcept |
| | Total count of dispatched events.
|
| |
| uint64_t | totalPosted () const noexcept |
| | Total count of posted events.
|
| |
|
| static uint64_t | nowNs () noexcept |
| |
template<std::size_t QueueCapacity = 1024>
class corium::profiler::LatencyTracker< QueueCapacity >
Real-time event latency and performance statistics tracker. Zero dynamic memory allocation. Tracks min, max, total queue latency and handler duration.
- Template Parameters
-
| QueueCapacity | Capacity of the parallel post-timestamp ring buffer (must match the event queue capacity for accurate per-event latency tracking). |
◆ LatencyTracker()
template<std::size_t QueueCapacity = 1024>
◆ averageExecutionDurationUs()
template<std::size_t QueueCapacity = 1024>
Average handler execution duration in microseconds.
◆ averageQueueLatencyUs()
template<std::size_t QueueCapacity = 1024>
Average queue latency in microseconds.
◆ disable()
template<std::size_t QueueCapacity = 1024>
Disable runtime profiling.
◆ enable()
template<std::size_t QueueCapacity = 1024>
Enable runtime profiling.
◆ isEnabled()
template<std::size_t QueueCapacity = 1024>
Check if runtime profiling is enabled.
◆ maxExecutionDurationUs()
template<std::size_t QueueCapacity = 1024>
Maximum handler execution duration in microseconds.
◆ maxQueueLatencyUs()
template<std::size_t QueueCapacity = 1024>
Maximum queue latency in microseconds.
◆ minQueueLatencyUs()
template<std::size_t QueueCapacity = 1024>
Minimum queue latency in microseconds.
◆ nowNs()
template<std::size_t QueueCapacity = 1024>
◆ onEventDispatched()
template<std::size_t QueueCapacity = 1024>
template<typename EventVariant >
| void corium::profiler::LatencyTracker< QueueCapacity >::onEventDispatched |
( |
const EventVariant & |
, |
|
|
uint8_t |
, |
|
|
uint64_t |
postTimeNs, |
|
|
uint64_t |
dispatchTimeNs, |
|
|
uint64_t |
finishTimeNs |
|
) |
| |
|
inlinenoexcept |
◆ onEventPosted()
template<std::size_t QueueCapacity = 1024>
template<typename EventVariant >
◆ recordPostTime()
template<std::size_t QueueCapacity = 1024>
Record the wall-clock post timestamp for the event being pushed now. Called by EventBus::post() immediately after the event enters the queue.
◆ resetStats()
template<std::size_t QueueCapacity = 1024>
Reset all accumulated statistics.
◆ setEnabled()
template<std::size_t QueueCapacity = 1024>
Enable or disable runtime latency profiling.
◆ takePostTime()
template<std::size_t QueueCapacity = 1024>
Pop and return the oldest post timestamp (called at dispatch time by EventBus).
◆ totalDispatched()
template<std::size_t QueueCapacity = 1024>
Total count of dispatched events.
◆ totalPosted()
template<std::size_t QueueCapacity = 1024>
Total count of posted events.
The documentation for this class was generated from the following file: