|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Metrics sample for autoscaling decisions. More...
#include <scaling_metrics.h>

Public Attributes | |
| std::chrono::steady_clock::time_point | timestamp |
| Timestamp when this sample was collected. | |
| std::size_t | worker_count {0} |
| Current number of workers in the pool. | |
| std::size_t | active_workers {0} |
| Number of workers currently processing jobs. | |
| std::size_t | queue_depth {0} |
| Number of jobs waiting in the queue. | |
| double | utilization {0.0} |
| Worker utilization ratio (0.0 - 1.0) | |
| double | queue_depth_per_worker {0.0} |
| Jobs per worker ratio. | |
| double | p95_latency_ms {0.0} |
| P95 latency in milliseconds. | |
| std::uint64_t | jobs_completed {0} |
| Jobs completed since last sample. | |
| std::uint64_t | jobs_submitted {0} |
| Jobs submitted since last sample. | |
| double | throughput_per_second {0.0} |
| Throughput in jobs per second. | |
Metrics sample for autoscaling decisions.
This structure captures a snapshot of thread pool metrics at a specific point in time. Multiple samples are aggregated to make scaling decisions, preventing reactive scaling on transient spikes.
Definition at line 51 of file scaling_metrics.h.
| std::size_t kcenon::thread::scaling_metrics_sample::active_workers {0} |
Number of workers currently processing jobs.
Definition at line 60 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| std::uint64_t kcenon::thread::scaling_metrics_sample::jobs_completed {0} |
Jobs completed since last sample.
Definition at line 75 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| std::uint64_t kcenon::thread::scaling_metrics_sample::jobs_submitted {0} |
Jobs submitted since last sample.
Definition at line 78 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| double kcenon::thread::scaling_metrics_sample::p95_latency_ms {0.0} |
P95 latency in milliseconds.
Definition at line 72 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| std::size_t kcenon::thread::scaling_metrics_sample::queue_depth {0} |
Number of jobs waiting in the queue.
Definition at line 63 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| double kcenon::thread::scaling_metrics_sample::queue_depth_per_worker {0.0} |
Jobs per worker ratio.
Definition at line 69 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| double kcenon::thread::scaling_metrics_sample::throughput_per_second {0.0} |
Throughput in jobs per second.
Definition at line 81 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| std::chrono::steady_clock::time_point kcenon::thread::scaling_metrics_sample::timestamp |
Timestamp when this sample was collected.
Definition at line 54 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| double kcenon::thread::scaling_metrics_sample::utilization {0.0} |
Worker utilization ratio (0.0 - 1.0)
Definition at line 66 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().
| std::size_t kcenon::thread::scaling_metrics_sample::worker_count {0} |
Current number of workers in the pool.
Definition at line 57 of file scaling_metrics.h.
Referenced by kcenon::thread::autoscaler::collect_metrics().