|
HIPO
4.3.0
High Performance Output data format for experimental physics
|
Runtime statistics for thread pool performance monitoring. More...
#include <threadpool.hpp>
Public Member Functions | |
| Statistics ()=default | |
| Default constructor. More... | |
| Statistics (const Statistics &)=delete | |
| Non-copyable (atomic members cannot be copied). More... | |
| Statistics & | operator= (const Statistics &)=delete |
| Non-copyable (atomic members cannot be copied). More... | |
| Statistics (Statistics &&other) noexcept | |
| Move constructor; transfers statistics state. More... | |
| Statistics & | operator= (Statistics &&other) noexcept |
| Move assignment; transfers statistics state. More... | |
| auto | get_throughput () const noexcept -> double |
| Calculates tasks completed per second. More... | |
| auto | get_uptime () const noexcept -> std::chrono::duration< double > |
| Calculates time elapsed since pool creation. More... | |
Public Attributes | |
| std::atomic< std::size_t > | tasks_submitted {0} |
| Total tasks submitted to the pool. More... | |
| std::atomic< std::size_t > | tasks_completed {0} |
| Total tasks completed successfully. More... | |
| std::atomic< std::size_t > | tasks_failed {0} |
| Total tasks that failed or threw exceptions. More... | |
| std::atomic< std::size_t > | tasks_pending {0} |
| Current number of pending (not yet executed) tasks. More... | |
| std::chrono::steady_clock::time_point | start_time {std::chrono::steady_clock::now()} |
| Pool creation timestamp. More... | |
Runtime statistics for thread pool performance monitoring.
Tracks metrics such as submitted tasks, completed tasks, failed tasks, and pending work, as well as the pool's uptime and throughput.
Definition at line 52 of file threadpool.hpp.
|
default |
Default constructor.
|
delete |
Non-copyable (atomic members cannot be copied).
|
delete |
Non-copyable (atomic members cannot be copied).
| std::chrono::steady_clock::time_point ThreadPool::Statistics::start_time {std::chrono::steady_clock::now()} |
Pool creation timestamp.
Definition at line 57 of file threadpool.hpp.
| std::atomic<std::size_t> ThreadPool::Statistics::tasks_completed {0} |
Total tasks completed successfully.
Definition at line 54 of file threadpool.hpp.
| std::atomic<std::size_t> ThreadPool::Statistics::tasks_failed {0} |
Total tasks that failed or threw exceptions.
Definition at line 55 of file threadpool.hpp.
| std::atomic<std::size_t> ThreadPool::Statistics::tasks_pending {0} |
Current number of pending (not yet executed) tasks.
Definition at line 56 of file threadpool.hpp.
| std::atomic<std::size_t> ThreadPool::Statistics::tasks_submitted {0} |
Total tasks submitted to the pool.
Definition at line 53 of file threadpool.hpp.