|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Thread-safe statistics for backpressure operations. More...
#include <backpressure_config.h>

Public Member Functions | |
| auto | reset () -> void |
| Resets all statistics to zero. | |
| auto | snapshot () const -> backpressure_stats_snapshot |
| Creates a copyable snapshot of current statistics. | |
Public Attributes | |
| std::atomic< std::uint64_t > | jobs_accepted {0} |
| Total jobs accepted into the queue. | |
| std::atomic< std::uint64_t > | jobs_rejected {0} |
| Total jobs rejected due to backpressure. | |
| std::atomic< std::uint64_t > | jobs_dropped {0} |
| Total jobs dropped (oldest dropped for new). | |
| std::atomic< std::uint64_t > | rate_limit_waits {0} |
| Number of times rate limiting caused a wait. | |
| std::atomic< std::uint64_t > | pressure_events {0} |
| Number of times high watermark was crossed. | |
| std::atomic< std::uint64_t > | total_block_time_ns {0} |
| Total time spent blocking in nanoseconds. | |
Thread-safe statistics for backpressure operations.
Tracks various counters and timing information about backpressure events for monitoring and debugging. Uses atomics for thread-safety.
Definition at line 395 of file backpressure_config.h.
|
inline |
Resets all statistics to zero.
Definition at line 430 of file backpressure_config.h.
References jobs_accepted, jobs_dropped, jobs_rejected, pressure_events, rate_limit_waits, and total_block_time_ns.
|
inlinenodiscard |
Creates a copyable snapshot of current statistics.
Definition at line 444 of file backpressure_config.h.
References jobs_accepted, kcenon::thread::backpressure_stats_snapshot::jobs_accepted, jobs_dropped, kcenon::thread::backpressure_stats_snapshot::jobs_dropped, jobs_rejected, kcenon::thread::backpressure_stats_snapshot::jobs_rejected, pressure_events, kcenon::thread::backpressure_stats_snapshot::pressure_events, rate_limit_waits, kcenon::thread::backpressure_stats_snapshot::rate_limit_waits, total_block_time_ns, and kcenon::thread::backpressure_stats_snapshot::total_block_time_ns.
Referenced by kcenon::thread::backpressure_job_queue::get_backpressure_stats().

| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::jobs_accepted {0} |
Total jobs accepted into the queue.
Definition at line 400 of file backpressure_config.h.
Referenced by reset(), and snapshot().
| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::jobs_dropped {0} |
Total jobs dropped (oldest dropped for new).
Definition at line 410 of file backpressure_config.h.
Referenced by reset(), and snapshot().
| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::jobs_rejected {0} |
Total jobs rejected due to backpressure.
Definition at line 405 of file backpressure_config.h.
Referenced by reset(), and snapshot().
| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::pressure_events {0} |
Number of times high watermark was crossed.
Definition at line 420 of file backpressure_config.h.
Referenced by reset(), and snapshot().
| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::rate_limit_waits {0} |
Number of times rate limiting caused a wait.
Definition at line 415 of file backpressure_config.h.
Referenced by reset(), and snapshot().
| std::atomic<std::uint64_t> kcenon::thread::backpressure_stats::total_block_time_ns {0} |
Total time spent blocking in nanoseconds.
Definition at line 425 of file backpressure_config.h.
Referenced by reset(), and snapshot().