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

Generic time-series buffer for metric history tracking. More...

#include "../core/result_types.h"
#include "../core/error_codes.h"
#include <algorithm>
#include <chrono>
#include <cmath>
#include <limits>
#include <mutex>
#include <stdexcept>
#include <vector>
Include dependency graph for time_series_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::time_series_buffer_config
 Configuration for time series buffer. More...
 
struct  kcenon::monitoring::time_series_sample< T >
 Single sample in time series with timestamp. More...
 
struct  kcenon::monitoring::time_series_statistics
 Statistics calculated from time series data. More...
 
class  kcenon::monitoring::detail::time_series_ring_buffer< Sample >
 Generic time-series ring buffer base template. More...
 
class  kcenon::monitoring::time_series_buffer< T >
 Thread-safe ring buffer for time-series data with statistics. More...
 
struct  kcenon::monitoring::load_average_sample
 Sample containing all three load averages. More...
 
struct  kcenon::monitoring::load_average_statistics
 Statistics for load average history. More...
 
class  kcenon::monitoring::load_average_history
 Specialized buffer for tracking load average history. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::monitoring
 
namespace  detail
 Internal implementation details - not part of public API.
 
namespace  kcenon::monitoring::detail
 

Functions

double kcenon::monitoring::detail::calculate_percentile (const std::vector< double > &sorted_values, double percentile)
 Calculate percentile from sorted values.
 
time_series_statistics kcenon::monitoring::detail::calculate_basic_statistics (const std::vector< double > &values, std::chrono::system_clock::time_point oldest_timestamp, std::chrono::system_clock::time_point newest_timestamp)
 Calculate basic statistics from a vector of double values.
 

Detailed Description

Generic time-series buffer for metric history tracking.

This file provides a thread-safe, memory-bounded ring buffer for storing time-series data with configurable retention and statistics calculation.

This is part of the public API. Stable interface - breaking changes follow semantic versioning.

Note
For C++20 module migration:
  • This will be exported as part of kcenon.monitoring.utils
  • detail namespace contents will remain internal
  • Public classes: time_series_buffer, load_average_history

Definition in file time_series_buffer.h.