threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
Loading...
Searching...
No Matches
Public Attributes | List of all members
threadman::ThreadPoolStats Struct Reference

A snapshot of a pool's headline counters. More...

#include <stats.hpp>

Collaboration diagram for threadman::ThreadPoolStats:
Collaboration graph
[legend]

Public Attributes

std::uint64_t pool_id = 0
 
std::string name
 
PoolState state = PoolState::Running
 
std::size_t workers = 0
 Currently live workers.
 
std::size_t core_workers = 0
 min_workers.
 
std::size_t max_workers = 0
 
std::size_t active = 0
 Workers currently in Running.
 
std::size_t idle = 0
 Workers currently in Idle.
 
std::size_t queued = 0
 Tasks waiting in the queue.
 
std::uint64_t completed = 0
 
std::uint64_t failed = 0
 
std::chrono::nanoseconds avg_execution_duration
 Rolling average across completed tasks.
 
std::uint64_t scale_ups = 0
 
std::uint64_t scale_downs = 0
 

Detailed Description

A snapshot of a pool's headline counters.

Member Data Documentation

◆ active

std::size_t threadman::ThreadPoolStats::active = 0

Workers currently in Running.

◆ avg_execution_duration

std::chrono::nanoseconds threadman::ThreadPoolStats::avg_execution_duration
Initial value:
{
0}

Rolling average across completed tasks.

◆ completed

std::uint64_t threadman::ThreadPoolStats::completed = 0

◆ core_workers

std::size_t threadman::ThreadPoolStats::core_workers = 0

min_workers.

◆ failed

std::uint64_t threadman::ThreadPoolStats::failed = 0

◆ idle

std::size_t threadman::ThreadPoolStats::idle = 0

Workers currently in Idle.

◆ max_workers

std::size_t threadman::ThreadPoolStats::max_workers = 0

◆ name

std::string threadman::ThreadPoolStats::name

◆ pool_id

std::uint64_t threadman::ThreadPoolStats::pool_id = 0

◆ queued

std::size_t threadman::ThreadPoolStats::queued = 0

Tasks waiting in the queue.

◆ scale_downs

std::uint64_t threadman::ThreadPoolStats::scale_downs = 0

◆ scale_ups

std::uint64_t threadman::ThreadPoolStats::scale_ups = 0

◆ state

PoolState threadman::ThreadPoolStats::state = PoolState::Running

◆ workers

std::size_t threadman::ThreadPoolStats::workers = 0

Currently live workers.


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