|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Statistics for ring buffer performance monitoring. More...
#include <ring_buffer.h>

Public Member Functions | |
| ring_buffer_stats () | |
| double | get_utilization (size_t current_size, size_t capacity) const |
| Get current utilization percentage. | |
| double | get_write_success_rate () const |
| Get write success rate. | |
| double | get_overflow_rate () const |
| Get overflow rate (overwrites per total writes) | |
| bool | is_overflow_rate_high () const |
| Check if overflow rate is high (> 10%) | |
| double | get_avg_contention () const |
| Get average contention (retries per write) | |
| double | get_read_success_rate () const |
| Get read success rate. | |
Public Attributes | |
| std::atomic< size_t > | total_writes {0} |
| std::atomic< size_t > | total_reads {0} |
| std::atomic< size_t > | overwrites {0} |
| std::atomic< size_t > | failed_writes {0} |
| std::atomic< size_t > | failed_reads {0} |
| std::atomic< size_t > | contention_retries {0} |
| std::chrono::system_clock::time_point | creation_time |
Statistics for ring buffer performance monitoring.
Definition at line 64 of file ring_buffer.h.
|
inline |
Definition at line 73 of file ring_buffer.h.
|
inline |
Get average contention (retries per write)
Definition at line 110 of file ring_buffer.h.
References contention_retries, and total_writes.
|
inline |
Get overflow rate (overwrites per total writes)
Definition at line 94 of file ring_buffer.h.
References overwrites, and total_writes.
Referenced by kcenon::monitoring::ring_buffer< T >::get_overflow_rate(), and is_overflow_rate_high().

|
inline |
Get read success rate.
Definition at line 119 of file ring_buffer.h.
References failed_reads, and total_reads.
|
inline |
Get current utilization percentage.
Definition at line 78 of file ring_buffer.h.
|
inline |
Get write success rate.
Definition at line 85 of file ring_buffer.h.
References failed_writes, and total_writes.
|
inline |
Check if overflow rate is high (> 10%)
Definition at line 103 of file ring_buffer.h.
References get_overflow_rate().
Referenced by kcenon::monitoring::ring_buffer< T >::is_overflow_rate_high().


| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::contention_retries {0} |
Definition at line 70 of file ring_buffer.h.
Referenced by get_avg_contention(), and kcenon::monitoring::ring_buffer< T >::reset_stats().
| std::chrono::system_clock::time_point kcenon::monitoring::ring_buffer_stats::creation_time |
Definition at line 71 of file ring_buffer.h.
Referenced by kcenon::monitoring::ring_buffer< T >::reset_stats().
| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::failed_reads {0} |
Definition at line 69 of file ring_buffer.h.
Referenced by get_read_success_rate(), kcenon::monitoring::ring_buffer< T >::read(), and kcenon::monitoring::ring_buffer< T >::reset_stats().
| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::failed_writes {0} |
Definition at line 68 of file ring_buffer.h.
Referenced by get_write_success_rate(), kcenon::monitoring::ring_buffer< T >::reset_stats(), and kcenon::monitoring::ring_buffer< T >::write().
| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::overwrites {0} |
Definition at line 67 of file ring_buffer.h.
Referenced by get_overflow_rate(), kcenon::monitoring::ring_buffer< T >::reset_stats(), and kcenon::monitoring::ring_buffer< T >::write().
| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::total_reads {0} |
Definition at line 66 of file ring_buffer.h.
Referenced by get_read_success_rate(), kcenon::monitoring::ring_buffer< T >::read(), and kcenon::monitoring::ring_buffer< T >::reset_stats().
| std::atomic<size_t> kcenon::monitoring::ring_buffer_stats::total_writes {0} |
Definition at line 65 of file ring_buffer.h.
Referenced by get_avg_contention(), get_overflow_rate(), get_write_success_rate(), kcenon::monitoring::ring_buffer< T >::reset_stats(), and kcenon::monitoring::ring_buffer< T >::write().