Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::time_series_config Struct Reference

Configuration for time series storage. More...

#include <time_series.h>

Collaboration diagram for kcenon::monitoring::time_series_config:
Collaboration graph

Public Member Functions

common::VoidResult validate () const
 Validate configuration.
 

Public Attributes

std::chrono::seconds retention_period {3600}
 
std::chrono::milliseconds resolution {1000}
 
size_t max_points = 3600
 
bool enable_compression = true
 
double compression_threshold = 0.01
 

Detailed Description

Configuration for time series storage.

Examples
time_series_storage_example.cpp.

Definition at line 34 of file time_series.h.

Member Function Documentation

◆ validate()

common::VoidResult kcenon::monitoring::time_series_config::validate ( ) const
inline

Validate configuration.

Definition at line 44 of file time_series.h.

44 {
45 if (retention_period.count() <= 0) {
47 "Retention period must be positive");
48 return common::VoidResult::err(err.to_common_error());
49 }
50
51 if (resolution.count() <= 0) {
53 "Resolution must be positive");
54 return common::VoidResult::err(err.to_common_error());
55 }
56
57 if (max_points == 0) {
59 "Max points must be positive");
60 return common::VoidResult::err(err.to_common_error());
61 }
62
63 return common::ok();
64 }
std::chrono::milliseconds resolution
Definition time_series.h:36
std::chrono::seconds retention_period
Definition time_series.h:35

References kcenon::monitoring::invalid_configuration, max_points, resolution, retention_period, and kcenon::monitoring::error_info::to_common_error().

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ compression_threshold

double kcenon::monitoring::time_series_config::compression_threshold = 0.01

◆ enable_compression

bool kcenon::monitoring::time_series_config::enable_compression = true

◆ max_points

◆ resolution

std::chrono::milliseconds kcenon::monitoring::time_series_config::resolution {1000}
Examples
time_series_storage_example.cpp.

Definition at line 36 of file time_series.h.

36{1000}; // Time resolution for aggregation

Referenced by demonstrate_basic_operations(), and validate().

◆ retention_period

std::chrono::seconds kcenon::monitoring::time_series_config::retention_period {3600}

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