Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::metrics::EnhancedSnapshot Struct Reference

Enhanced snapshot with latency percentiles and throughput. More...

#include <enhanced_metrics.h>

Collaboration diagram for kcenon::thread::metrics::EnhancedSnapshot:
Collaboration graph

Public Attributes

std::uint64_t tasks_submitted {0}
 Total tasks submitted to the pool.
 
std::uint64_t tasks_executed {0}
 Total tasks successfully executed.
 
std::uint64_t tasks_failed {0}
 Total tasks that failed during execution.
 
double enqueue_latency_p50_us {0.0}
 Median (P50) enqueue latency in microseconds.
 
double enqueue_latency_p90_us {0.0}
 90th percentile enqueue latency in microseconds.
 
double enqueue_latency_p99_us {0.0}
 99th percentile enqueue latency in microseconds.
 
double execution_latency_p50_us {0.0}
 Median execution latency in microseconds.
 
double execution_latency_p90_us {0.0}
 90th percentile execution latency in microseconds.
 
double execution_latency_p99_us {0.0}
 99th percentile execution latency in microseconds.
 
double wait_time_p50_us {0.0}
 Median wait time (queue time) in microseconds.
 
double wait_time_p90_us {0.0}
 90th percentile wait time in microseconds.
 
double wait_time_p99_us {0.0}
 99th percentile wait time in microseconds.
 
double throughput_1s {0.0}
 Tasks completed per second (1-second window).
 
double throughput_1m {0.0}
 Tasks completed per second (1-minute window average).
 
std::size_t current_queue_depth {0}
 Current queue depth.
 
std::size_t peak_queue_depth {0}
 Peak queue depth since last reset.
 
double avg_queue_depth {0.0}
 Average queue depth over the sampling period.
 
double worker_utilization {0.0}
 Overall worker utilization (0.0 - 1.0).
 
std::vector< double > per_worker_utilization
 Per-worker utilization (0.0 - 1.0 each).
 
std::size_t active_workers {0}
 Number of active workers.
 
std::uint64_t total_busy_time_ns {0}
 Total busy time across all workers in nanoseconds.
 
std::uint64_t total_idle_time_ns {0}
 Total idle time across all workers in nanoseconds.
 
std::chrono::steady_clock::time_point snapshot_time
 Timestamp when this snapshot was taken.
 

Detailed Description

Enhanced snapshot with latency percentiles and throughput.

This structure contains all metrics data at a point in time, including basic counters, latency percentiles, throughput rates, queue health, and worker utilization.

Definition at line 35 of file enhanced_metrics.h.

Member Data Documentation

◆ active_workers

◆ avg_queue_depth

double kcenon::thread::metrics::EnhancedSnapshot::avg_queue_depth {0.0}

◆ current_queue_depth

◆ enqueue_latency_p50_us

double kcenon::thread::metrics::EnhancedSnapshot::enqueue_latency_p50_us {0.0}

◆ enqueue_latency_p90_us

double kcenon::thread::metrics::EnhancedSnapshot::enqueue_latency_p90_us {0.0}

◆ enqueue_latency_p99_us

double kcenon::thread::metrics::EnhancedSnapshot::enqueue_latency_p99_us {0.0}

◆ execution_latency_p50_us

double kcenon::thread::metrics::EnhancedSnapshot::execution_latency_p50_us {0.0}

◆ execution_latency_p90_us

double kcenon::thread::metrics::EnhancedSnapshot::execution_latency_p90_us {0.0}

◆ execution_latency_p99_us

double kcenon::thread::metrics::EnhancedSnapshot::execution_latency_p99_us {0.0}

◆ peak_queue_depth

std::size_t kcenon::thread::metrics::EnhancedSnapshot::peak_queue_depth {0}

◆ per_worker_utilization

std::vector<double> kcenon::thread::metrics::EnhancedSnapshot::per_worker_utilization

◆ snapshot_time

std::chrono::steady_clock::time_point kcenon::thread::metrics::EnhancedSnapshot::snapshot_time

Timestamp when this snapshot was taken.

Definition at line 175 of file enhanced_metrics.h.

Referenced by kcenon::thread::metrics::EnhancedThreadPoolMetrics::snapshot().

◆ tasks_executed

std::uint64_t kcenon::thread::metrics::EnhancedSnapshot::tasks_executed {0}

◆ tasks_failed

std::uint64_t kcenon::thread::metrics::EnhancedSnapshot::tasks_failed {0}

◆ tasks_submitted

std::uint64_t kcenon::thread::metrics::EnhancedSnapshot::tasks_submitted {0}

◆ throughput_1m

double kcenon::thread::metrics::EnhancedSnapshot::throughput_1m {0.0}

◆ throughput_1s

double kcenon::thread::metrics::EnhancedSnapshot::throughput_1s {0.0}

◆ total_busy_time_ns

std::uint64_t kcenon::thread::metrics::EnhancedSnapshot::total_busy_time_ns {0}

Total busy time across all workers in nanoseconds.

Definition at line 165 of file enhanced_metrics.h.

165{0};

Referenced by kcenon::thread::metrics::EnhancedThreadPoolMetrics::snapshot().

◆ total_idle_time_ns

std::uint64_t kcenon::thread::metrics::EnhancedSnapshot::total_idle_time_ns {0}

Total idle time across all workers in nanoseconds.

Definition at line 170 of file enhanced_metrics.h.

170{0};

Referenced by kcenon::thread::metrics::EnhancedThreadPoolMetrics::snapshot().

◆ wait_time_p50_us

double kcenon::thread::metrics::EnhancedSnapshot::wait_time_p50_us {0.0}

◆ wait_time_p90_us

double kcenon::thread::metrics::EnhancedSnapshot::wait_time_p90_us {0.0}

◆ wait_time_p99_us

double kcenon::thread::metrics::EnhancedSnapshot::wait_time_p99_us {0.0}

◆ worker_utilization

double kcenon::thread::metrics::EnhancedSnapshot::worker_utilization {0.0}

Overall worker utilization (0.0 - 1.0).

Calculated as: total_busy_time / (total_busy_time + total_idle_time)

Definition at line 146 of file enhanced_metrics.h.

146{0.0};

Referenced by kcenon::thread::metrics::JsonBackend::export_enhanced(), kcenon::thread::metrics::LoggingBackend::export_enhanced(), kcenon::thread::metrics::PrometheusBackend::export_enhanced(), and kcenon::thread::metrics::EnhancedThreadPoolMetrics::snapshot().


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