Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::ThreadPoolStats Struct Reference

Statistics collected by ThreadPool. More...

#include <thread_pool.H>

Public Member Functions

size_t total_processed () const noexcept
 Total tasks processed (completed + failed)
 
double queue_utilization (size_t soft_limit) const noexcept
 Queue utilization as percentage (0-100)
 

Public Attributes

size_t tasks_completed = 0
 Total tasks completed.
 
size_t tasks_failed = 0
 Tasks that threw exceptions (detached)
 
size_t current_queue_size = 0
 Current pending tasks.
 
size_t current_active = 0
 Currently executing tasks.
 
size_t num_workers = 0
 Number of worker threads.
 
size_t peak_queue_size = 0
 Maximum queue size observed.
 

Detailed Description

Statistics collected by ThreadPool.

Provides insight into pool performance for monitoring and tuning.

Definition at line 163 of file thread_pool.H.

Member Function Documentation

◆ queue_utilization()

double Aleph::ThreadPoolStats::queue_utilization ( size_t  soft_limit) const
inlinenoexcept

Queue utilization as percentage (0-100)

Definition at line 179 of file thread_pool.H.

References current_queue_size, and Aleph::maps().

Referenced by TEST_F().

◆ total_processed()

size_t Aleph::ThreadPoolStats::total_processed ( ) const
inlinenoexcept

Total tasks processed (completed + failed)

Definition at line 173 of file thread_pool.H.

References tasks_completed, and tasks_failed.

Member Data Documentation

◆ current_active

size_t Aleph::ThreadPoolStats::current_active = 0

Currently executing tasks.

Definition at line 168 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats().

◆ current_queue_size

size_t Aleph::ThreadPoolStats::current_queue_size = 0

Current pending tasks.

Definition at line 167 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats(), queue_utilization(), and TEST_F().

◆ num_workers

size_t Aleph::ThreadPoolStats::num_workers = 0

Number of worker threads.

Definition at line 169 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats().

◆ peak_queue_size

size_t Aleph::ThreadPoolStats::peak_queue_size = 0

Maximum queue size observed.

Definition at line 170 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats().

◆ tasks_completed

size_t Aleph::ThreadPoolStats::tasks_completed = 0

Total tasks completed.

Definition at line 165 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats(), and total_processed().

◆ tasks_failed

size_t Aleph::ThreadPoolStats::tasks_failed = 0

Tasks that threw exceptions (detached)

Definition at line 166 of file thread_pool.H.

Referenced by Aleph::ThreadPool::get_stats(), and total_processed().


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