gtopt::StallTracker struct

Stall detector: counts consecutive periodic-log intervals in which work was queued (pending > 0) but tasks_completed did not advance.

Public static variables

static int warn_after
Intervals without progress before the stall warning fires.

Public functions

auto observe(std::size_t pending, std::size_t completed) -> int noexcept

Public variables

int intervals
std::size_t last_completed

Function documentation

int gtopt::StallTracker::observe(std::size_t pending, std::size_t completed) noexcept

Record one periodic observation and return the updated number of consecutive no-progress intervals (0 when progress was made or nothing is pending).