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

Scaling decision result. More...

#include <scaling_metrics.h>

Collaboration diagram for kcenon::thread::scaling_decision:
Collaboration graph

Public Member Functions

auto should_scale () const -> bool
 Checks if scaling should occur.
 

Public Attributes

scaling_direction direction {scaling_direction::none}
 The scaling direction.
 
scaling_reason reason {scaling_reason::queue_depth}
 Reason for the decision.
 
std::size_t target_workers {0}
 Target worker count after scaling.
 
std::string explanation
 Human-readable explanation.
 

Detailed Description

Scaling decision result.

Contains the decision made by the autoscaler along with the reason and explanation for debugging and logging.

Definition at line 90 of file scaling_metrics.h.

Member Function Documentation

◆ should_scale()

auto kcenon::thread::scaling_decision::should_scale ( ) const -> bool
inlinenodiscard

Checks if scaling should occur.

Returns
true if direction is not none.

Definition at line 108 of file scaling_metrics.h.

109 {
111 }
scaling_direction direction
The scaling direction.

References direction, and kcenon::thread::none.

Member Data Documentation

◆ direction

scaling_direction kcenon::thread::scaling_decision::direction {scaling_direction::none}

The scaling direction.

Definition at line 93 of file scaling_metrics.h.

Referenced by should_scale().

◆ explanation

std::string kcenon::thread::scaling_decision::explanation

Human-readable explanation.

Definition at line 102 of file scaling_metrics.h.

◆ reason

scaling_reason kcenon::thread::scaling_decision::reason {scaling_reason::queue_depth}

Reason for the decision.

Definition at line 96 of file scaling_metrics.h.

@ queue_depth
Queue depth threshold exceeded.

◆ target_workers

std::size_t kcenon::thread::scaling_decision::target_workers {0}

Target worker count after scaling.

Definition at line 99 of file scaling_metrics.h.

99{0};

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