Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
Diagnostics

Runtime diagnostics, health monitoring, and execution tracing for thread pools. More...

Classes

struct  kcenon::thread::diagnostics::bottleneck_report
 Analysis report of bottlenecks in the thread pool. More...
 
struct  kcenon::thread::diagnostics::job_execution_event
 Event data for job execution tracing. More...
 
class  kcenon::thread::diagnostics::execution_event_listener
 Interface for receiving job execution events. More...
 
struct  kcenon::thread::diagnostics::health_thresholds
 Configurable thresholds for health status determination. More...
 
struct  kcenon::thread::diagnostics::component_health
 Health status of a single component. More...
 
struct  kcenon::thread::diagnostics::health_status
 Comprehensive health status of the thread pool. More...
 
struct  kcenon::thread::diagnostics::job_info
 Information about a job in the thread pool. More...
 
struct  kcenon::thread::diagnostics::thread_info
 Information about a worker thread in the pool. More...
 
struct  kcenon::thread::diagnostics::diagnostics_config
 Configuration options for thread pool diagnostics. More...
 
class  kcenon::thread::diagnostics::thread_pool_diagnostics
 Comprehensive diagnostics API for thread pool monitoring. More...
 

Enumerations

enum class  kcenon::thread::diagnostics::bottleneck_type {
  kcenon::thread::diagnostics::bottleneck_type::none , kcenon::thread::diagnostics::bottleneck_type::queue_full , kcenon::thread::diagnostics::bottleneck_type::slow_consumer , kcenon::thread::diagnostics::bottleneck_type::worker_starvation ,
  kcenon::thread::diagnostics::bottleneck_type::lock_contention , kcenon::thread::diagnostics::bottleneck_type::uneven_distribution , kcenon::thread::diagnostics::bottleneck_type::memory_pressure
}
 Type of bottleneck detected in the thread pool. More...
 
enum class  kcenon::thread::diagnostics::event_type {
  kcenon::thread::diagnostics::event_type::enqueued , kcenon::thread::diagnostics::event_type::dequeued , kcenon::thread::diagnostics::event_type::started , kcenon::thread::diagnostics::event_type::completed ,
  kcenon::thread::diagnostics::event_type::failed , kcenon::thread::diagnostics::event_type::cancelled , kcenon::thread::diagnostics::event_type::retried
}
 Type of job execution event. More...
 
enum class  kcenon::thread::diagnostics::health_state { kcenon::thread::diagnostics::health_state::healthy , kcenon::thread::diagnostics::health_state::degraded , kcenon::thread::diagnostics::health_state::unhealthy , kcenon::thread::diagnostics::health_state::unknown }
 Overall health state of a component or system. More...
 
enum class  kcenon::thread::diagnostics::job_status {
  kcenon::thread::diagnostics::job_status::pending , kcenon::thread::diagnostics::job_status::running , kcenon::thread::diagnostics::job_status::completed , kcenon::thread::diagnostics::job_status::failed ,
  kcenon::thread::diagnostics::job_status::cancelled , kcenon::thread::diagnostics::job_status::timed_out
}
 Status of a job in the thread pool. More...
 
enum class  kcenon::thread::diagnostics::worker_state { kcenon::thread::diagnostics::worker_state::idle , kcenon::thread::diagnostics::worker_state::active , kcenon::thread::diagnostics::worker_state::stopping , kcenon::thread::diagnostics::worker_state::stopped }
 Current state of a worker thread. More...
 

Detailed Description

Runtime diagnostics, health monitoring, and execution tracing for thread pools.

Enumeration Type Documentation

◆ bottleneck_type

Type of bottleneck detected in the thread pool.

Categorizes different types of performance bottlenecks that can occur in a thread pool system.

Enumerator
none 

No bottleneck detected.

queue_full 

Queue is at capacity.

slow_consumer 

Workers can't keep up with job submission rate.

worker_starvation 

Not enough workers for the workload.

lock_contention 

High mutex wait times affecting throughput.

uneven_distribution 

Work is not evenly distributed (work stealing needed)

memory_pressure 

Excessive memory allocations causing slowdown.

Definition at line 31 of file bottleneck_report.h.

32 {
33 none,
40 };
@ none
Below low_watermark, queue is healthy.
@ slow_consumer
Workers can't keep up with job submission rate.
@ lock_contention
High mutex wait times affecting throughput.
@ worker_starvation
Not enough workers for the workload.
@ memory_pressure
Excessive memory allocations causing slowdown.
@ uneven_distribution
Work is not evenly distributed (work stealing needed)

◆ event_type

Type of job execution event.

Represents the different events that can occur during a job's lifecycle.

Enumerator
enqueued 

Job was added to the queue.

dequeued 

Job was taken from queue by a worker.

started 

Job execution started.

completed 

Job completed successfully.

failed 

Job failed with an error.

cancelled 

Job was cancelled.

retried 

Job is being retried after failure.

Definition at line 35 of file execution_event.h.

36 {
37 enqueued,
38 dequeued,
39 started,
40 completed,
41 failed,
42 cancelled,
43 retried
44 };
@ dequeued
Job was taken from queue by a worker.
@ retried
Job is being retried after failure.
@ enqueued
Job was added to the queue.
@ failed
Job execution failed.
@ cancelled
Job was cancelled before execution.
@ completed
Job has completed successfully.

◆ health_state

Overall health state of a component or system.

Standard health states compatible with most health check frameworks and Kubernetes-style health probes.

Enumerator
healthy 

Component is fully operational.

degraded 

Component is operational but with reduced capacity/performance.

unhealthy 

Component is not operational or failing.

unknown 

Health state cannot be determined.

Definition at line 90 of file health_status.h.

91 {
92 healthy,
93 degraded,
94 unhealthy,
95 unknown
96 };
@ healthy
Component is fully operational.
@ degraded
Component is operational but with reduced capacity/performance.
@ unknown
Health state cannot be determined.
@ unhealthy
Component is not operational or failing.

◆ job_status

Status of a job in the thread pool.

Represents the current lifecycle state of a job from enqueue to completion.

Enumerator
pending 

Job is waiting in the queue.

running 

Job is currently being executed.

completed 

Job completed successfully.

failed 

Job failed with an error.

cancelled 

Job was cancelled before completion.

timed_out 

Job exceeded its timeout limit.

Definition at line 32 of file job_info.h.

33 {
34 pending,
35 running,
36 completed,
37 failed,
38 cancelled,
40 };
@ timed_out
Job exceeded its timeout limit.
@ running
Job is currently being executed.
@ pending
Job is waiting to be executed.

◆ worker_state

Current state of a worker thread.

Represents the operational state of a thread worker in the pool.

Enumerator
idle 

Worker is waiting for jobs.

active 

Worker is executing a job.

stopping 

Worker is in the process of stopping.

stopped 

Worker has stopped.

Definition at line 34 of file thread_info.h.

35 {
36 idle,
37 active,
38 stopping,
39 stopped
40 };
@ stopping
Worker is shutting down.
@ active
Worker is actively processing jobs.
@ idle
Worker is idle, waiting for work.
@ stopped
Worker has stopped.