pub struct GraphNodeHealth {
pub node: NodeId,
pub started: u64,
pub completed: u64,
pub failed: u64,
}Expand description
Health rollup for a single graph node across one run.
A graph node is the graph’s unit of work — frequently a delegated agent or
tool call (see crate::graph::SubAgentNode) — so per-node success/failure
counts double as tool health telemetry for the graph. Counts are derived
from durable GraphObservations by correlating node.started with
node.completed / node.failed.
Fields§
§node: NodeIdThe node these counts describe.
started: u64Number of node.started observations seen.
completed: u64Number of node.completed observations seen.
failed: u64Number of node.failed observations seen.
Implementations§
Source§impl GraphNodeHealth
impl GraphNodeHealth
Sourcepub fn attempts(&self) -> u64
pub fn attempts(&self) -> u64
Terminal attempts (completed + failed) — activations with a known
outcome. started may exceed this while a node is still running.
Sourcepub fn failure_rate(&self) -> f64
pub fn failure_rate(&self) -> f64
Fraction of terminal attempts that failed, in 0.0..=1.0. Returns 0.0
when the node has no terminal attempts yet.
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
True when the node has never failed.
Trait Implementations§
Source§impl Clone for GraphNodeHealth
impl Clone for GraphNodeHealth
Source§fn clone(&self) -> GraphNodeHealth
fn clone(&self) -> GraphNodeHealth
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more