Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
ring_buffer.h File Reference

Lock-free ring buffer for efficient metric storage. More...

#include <kcenon/monitoring/core/result_types.h>
#include <kcenon/monitoring/core/error_codes.h>
#include <memory>
#include <atomic>
#include <vector>
#include <chrono>
#include <cstddef>
#include <type_traits>
Include dependency graph for ring_buffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::monitoring::ring_buffer_config
 Configuration for ring buffer behavior. More...
 
struct  kcenon::monitoring::ring_buffer_stats
 Statistics for ring buffer performance monitoring. More...
 
class  kcenon::monitoring::ring_buffer< T >
 Lock-free ring buffer with atomic operations. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::monitoring
 

Functions

template<typename T >
std::unique_ptr< ring_buffer< T > > kcenon::monitoring::make_ring_buffer (size_t capacity=8192)
 Helper function to create a ring buffer with default configuration.
 
template<typename T >
std::unique_ptr< ring_buffer< T > > kcenon::monitoring::make_ring_buffer (const ring_buffer_config &config)
 Helper function to create a ring buffer with custom configuration.
 

Detailed Description

Lock-free ring buffer for efficient metric storage.

This file provides a high-performance, memory-efficient ring buffer implementation specifically designed for metric storage with minimal allocation overhead and cache-friendly access patterns.

Note
For C++20 module migration:
  • This header will be in the internal partition
  • Export only through buffer_manager or buffering_strategy

Definition in file ring_buffer.h.