Skip to main content

StallGuard Class

Tracks progress against a per-stream target and a stall deadline. More...

Declaration

class simaai::neat::graph::GraphRun::StallGuard { ... }

Included Headers

#include <GraphRun.h>

Friends Index

classGraphRun

Private Constructors Index

StallGuard (std::vector< NodeId > nodes, std::vector< std::string > streams, int per_stream_target, int stall_ms)

Public Member Functions Index

boolupdate (const GraphRunStats &stats)

Refresh the guard with the current stats. Returns true if done() || stalled(). More...

booldone () const

True once every tracked stream has reached the per-stream target. More...

boolstalled () const

True if no progress has been observed for the configured stall interval. More...

int64_ttarget_progress () const

Current per-stream target — useful for progress display. More...

Private Member Attributes Index

std::vector< NodeId >nodes_
std::vector< std::string >streams_
intper_stream_target_ = 0
intstall_ms_ = 0
boolinitialized_ = false
booldone_ = false
boolstalled_ = false
int64_ttarget_progress_ = 0
std::chrono::steady_clock::time_pointlast_progress {}

Description

Tracks progress against a per-stream target and a stall deadline.

Used by pull_until() to decide when to stop. After each update(), query done() (target reached) and stalled() (no progress for the configured interval).

Definition at line 221 of file GraphRun.h.

Friends

GraphRun

friend class GraphRun

Definition at line 239 of file GraphRun.h.

239 friend class GraphRun;

Private Constructors

StallGuard()

simaai::neat::graph::GraphRun::StallGuard::StallGuard (std::vector< NodeId > nodes, std::vector< std::string > streams, int per_stream_target, int stall_ms)

Definition at line 240 of file GraphRun.h.

Public Member Functions

done()

bool simaai::neat::graph::GraphRun::StallGuard::done ()
inline

True once every tracked stream has reached the per-stream target.

Definition at line 226 of file GraphRun.h.

226 bool done() const {
227 return done_;
228 }

stalled()

bool simaai::neat::graph::GraphRun::StallGuard::stalled ()
inline

True if no progress has been observed for the configured stall interval.

Definition at line 230 of file GraphRun.h.

230 bool stalled() const {
231 return stalled_;
232 }

target_progress()

int64_t simaai::neat::graph::GraphRun::StallGuard::target_progress ()
inline

Current per-stream target — useful for progress display.

Definition at line 234 of file GraphRun.h.

234 int64_t target_progress() const {
235 return target_progress_;
236 }

update()

bool simaai::neat::graph::GraphRun::StallGuard::update (const GraphRunStats & stats)

Refresh the guard with the current stats. Returns true if done() || stalled().

Definition at line 224 of file GraphRun.h.

Private Member Attributes

done_

bool simaai::neat::graph::GraphRun::StallGuard::done_ = false

Definition at line 248 of file GraphRun.h.

248 bool done_ = false;

initialized_

bool simaai::neat::graph::GraphRun::StallGuard::initialized_ = false

Definition at line 247 of file GraphRun.h.

247 bool initialized_ = false;

last_progress

std::chrono::steady_clock::time_point simaai::neat::graph::GraphRun::StallGuard::last_progress {}

Definition at line 251 of file GraphRun.h.

251 std::chrono::steady_clock::time_point last_progress{};

nodes_

std::vector<NodeId> simaai::neat::graph::GraphRun::StallGuard::nodes_

Definition at line 243 of file GraphRun.h.

243 std::vector<NodeId> nodes_;

per_stream_target_

int simaai::neat::graph::GraphRun::StallGuard::per_stream_target_ = 0

Definition at line 245 of file GraphRun.h.

245 int per_stream_target_ = 0;

stall_ms_

int simaai::neat::graph::GraphRun::StallGuard::stall_ms_ = 0

Definition at line 246 of file GraphRun.h.

246 int stall_ms_ = 0;

stalled_

bool simaai::neat::graph::GraphRun::StallGuard::stalled_ = false

Definition at line 249 of file GraphRun.h.

249 bool stalled_ = false;

streams_

std::vector<std::string> simaai::neat::graph::GraphRun::StallGuard::streams_

Definition at line 244 of file GraphRun.h.

244 std::vector<std::string> streams_;

target_progress_

int64_t simaai::neat::graph::GraphRun::StallGuard::target_progress_ = 0

Definition at line 250 of file GraphRun.h.

250 int64_t target_progress_ = 0;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.