|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Statistics about sampling behavior. More...
#include <sampling_config.h>

Public Member Functions | |
| double | actual_ratio () const |
| Calculate the actual sampling ratio. | |
| void | reset () |
| Reset all statistics. | |
Public Attributes | |
| std::uint64_t | total_count = 0 |
| Total number of log messages considered for sampling. | |
| std::uint64_t | sampled_count = 0 |
| Number of messages that passed sampling (were logged) | |
| std::uint64_t | dropped_count = 0 |
| Number of messages dropped due to sampling. | |
| std::uint64_t | bypassed_count = 0 |
| Number of messages that bypassed sampling (always_log levels) | |
| double | effective_rate = 1.0 |
| Current effective sampling rate. | |
| bool | is_throttling = false |
| Whether adaptive sampling is currently reducing the rate. | |
Statistics about sampling behavior.
Tracks sampling metrics for monitoring and debugging purposes. All counters are thread-safe when accessed through the sampler API.
Definition at line 305 of file sampling_config.h.
|
inlinenodiscard |
Calculate the actual sampling ratio.
Definition at line 341 of file sampling_config.h.
References bypassed_count, sampled_count, and total_count.
|
inline |
Reset all statistics.
Definition at line 352 of file sampling_config.h.
References bypassed_count, dropped_count, effective_rate, is_throttling, sampled_count, and total_count.
| std::uint64_t kcenon::logger::sampling::sampling_stats::bypassed_count = 0 |
Number of messages that bypassed sampling (always_log levels)
Definition at line 324 of file sampling_config.h.
Referenced by actual_ratio(), kcenon::logger::sampling::log_sampler::get_stats(), and reset().
| std::uint64_t kcenon::logger::sampling::sampling_stats::dropped_count = 0 |
Number of messages dropped due to sampling.
Definition at line 319 of file sampling_config.h.
Referenced by kcenon::logger::sampling::log_sampler::get_stats(), and reset().
| double kcenon::logger::sampling::sampling_stats::effective_rate = 1.0 |
Current effective sampling rate.
May differ from configured rate when adaptive sampling is active
Definition at line 330 of file sampling_config.h.
Referenced by kcenon::logger::sampling::log_sampler::get_stats(), and reset().
| bool kcenon::logger::sampling::sampling_stats::is_throttling = false |
Whether adaptive sampling is currently reducing the rate.
Definition at line 335 of file sampling_config.h.
Referenced by kcenon::logger::sampling::log_sampler::get_stats(), and reset().
| std::uint64_t kcenon::logger::sampling::sampling_stats::sampled_count = 0 |
Number of messages that passed sampling (were logged)
Definition at line 314 of file sampling_config.h.
Referenced by actual_ratio(), kcenon::logger::sampling::log_sampler::get_stats(), and reset().
| std::uint64_t kcenon::logger::sampling::sampling_stats::total_count = 0 |
Total number of log messages considered for sampling.
Definition at line 309 of file sampling_config.h.
Referenced by actual_ratio(), kcenon::logger::sampling::log_sampler::get_stats(), and reset().