pub enum RunStateCmd {
Show 19 variants
OpenTranscript(PathBuf),
Sysmon(SysmonSample),
InstallTree(SceneTree),
PhaseStarting {
exec_id: u64,
scene_node_id: SceneNodeId,
name: String,
labels: String,
op_templates: usize,
total_cycles: u64,
concurrency: usize,
},
PhaseCompleted {
exec_id: u64,
scene_node_id: SceneNodeId,
name: String,
labels: String,
duration_secs: f64,
},
PhaseFailed {
exec_id: u64,
scene_node_id: SceneNodeId,
name: String,
labels: String,
error: String,
},
OpStarting {
parent: SceneNodeId,
op_name: String,
},
OpMeasure {
parent: SceneNodeId,
op_name: String,
text: String,
},
OpCompleted {
parent: SceneNodeId,
op_name: String,
duration_secs: f64,
},
OpFailed {
parent: SceneNodeId,
op_name: String,
error: String,
},
PhaseProgress(PhaseProgressUpdate),
AttachPhaseRender(PhaseRenderHandle),
RunFinished,
Log {
severity: LogSeverity,
tag: EventTag,
message: String,
},
LatencyFrame {
min: u64,
p50: u64,
p90: u64,
p99: u64,
p999: u64,
max: u64,
},
SparklineSamples {
ops: Option<f64>,
rows: Option<f64>,
rows_label: Option<String>,
},
SetMeta {
profiler: Option<String>,
limit: Option<String>,
},
FrameAck(Sender<()>),
Barrier(Sender<()>),
}Expand description
One mutation of RunState. Every observer-driven and
UI-driven write is one of these variants. The actor’s
match is exhaustive — adding a new mutation requires
adding a variant and a handler arm, by design.
Variants§
OpenTranscript(PathBuf)
Session directory is ready — open <dir>/transcript.log and flush any
lines buffered since actor start.
Sysmon(SysmonSample)
Latest sysmon sample window (session-level host utilization).
InstallTree(SceneTree)
Replace the scenario tree wholesale (called once after pre-mapping).
PhaseStarting
A phase has begun. Carries everything needed to seed an
ActivePhase entry.
Fields
scene_node_id: SceneNodeIdSRD-100 P1c — dispatch-time scene-tree node id for this
phase. The actor flips THIS node (race-safe under
concurrent same-name dispatch) instead of re-matching by
(name, status).
PhaseCompleted
A phase finished cleanly. The actor builds the
PhaseSummary from its own active-phase entry before
removing it.
Fields
scene_node_id: SceneNodeIdSRD-100 P1c — dispatch-time scene-tree node id (see
Self::PhaseStarting).
PhaseFailed
A phase failed. The actor removes the active entry and flips the tree node’s status.
Fields
scene_node_id: SceneNodeIdSRD-100 P1c — dispatch-time scene-tree node id (see
Self::PhaseStarting).
OpStarting
SRD-63 — an op-level status leaf (readout: visible) started, keyed
by its parent phase’s scene-node id.
OpMeasure
An op-level status leaf completed; duration_secs is its execution time.
The op’s key measurable, arriving just before its completion.
OpCompleted
OpFailed
An op-level status leaf failed.
PhaseProgress(PhaseProgressUpdate)
Live update from the executor’s progress thread.
AttachPhaseRender(PhaseRenderHandle)
SRD-100 P2 — attach the per-phase live render handle to the
matching ActivePhase, fired once by the executor after the
activity’s metrics/binder exist. The consumer-side status
renderers fold active_phases and render each phase’s status
off its handle (no producer thread, no status_render scalar).
RunFinished
Run is complete; flips state.finished so the renderer
drops out of its event loop.
Log
Append a log line to the ring buffer.
LatencyFrame
Latency frame ingest from the metrics scheduler. Updates the live percentile fields, the rolling histories, and each active phase’s peak trackers.
SparklineSamples
Sparkline samples for the throughput / secondary-counter
rows. Driven from the same metrics-frame drain as
LatencyFrame.
SetMeta
Bookkeeping fields the runner sets before the run starts (profiler / limit strings shown in the header strip).
FrameAck(Sender<()>)
Synchronous render checkpoint. Processed in command order so its position in the queue marks “all preceding mutations have been applied”. The actor:
- registers
txin the sharedpending_acksqueue, - sets the
force_redrawflag, - publishes a fresh snapshot,
after which the TUI thread observes force_redraw, drops
its poll timeout to zero, draws one frame against the
just-published state, and drains pending_acks — at which
point each registered tx is signalled and the original
caller’s blocking rx.recv() returns.
Used by crate::observer::TuiObserver’s phase_completed /
phase_failed observer callbacks to guarantee
at least one fully rendered frame of the just-completed
phase before the executor moves on. The tick_rate
throttle is bypassed for this single redraw.
Barrier(Sender<()>)
Queue barrier: acked by the actor the moment it is
processed, AFTER every command sent before it (the inbox is
ordered). Unlike Self::FrameAck it does not wait for a
TUI draw, so it works on every surface — the post-run
reporter uses it to guarantee the snapshot reflects all
lifecycle events before counting phases (a fast walk could
otherwise outrun the actor and report bogus not-run counts
and exit codes).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RunStateCmd
impl !UnwindSafe for RunStateCmd
impl Forget for RunStateCmd
impl Freeze for RunStateCmd
impl Move for RunStateCmd
impl Send for RunStateCmd
impl Sync for RunStateCmd
impl Unpin for RunStateCmd
impl UnsafeUnpin for RunStateCmd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more