Skip to main content

RunStateCmd

Enum RunStateCmd 

Source
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

§exec_id: u64
§scene_node_id: SceneNodeId

SRD-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).

§name: String
§labels: String
§op_templates: usize

Count of distinct op definitions in the phase (the “shape” of the stanza; typically 1 for query workloads).

§total_cycles: u64

Number of times the stanza will iterate (the “amount” of work).

§concurrency: usize
§

PhaseCompleted

A phase finished cleanly. The actor builds the PhaseSummary from its own active-phase entry before removing it.

Fields

§exec_id: u64
§scene_node_id: SceneNodeId

SRD-100 P1c — dispatch-time scene-tree node id (see Self::PhaseStarting).

§name: String
§labels: String
§duration_secs: f64
§

PhaseFailed

A phase failed. The actor removes the active entry and flips the tree node’s status.

Fields

§exec_id: u64
§scene_node_id: SceneNodeId

SRD-100 P1c — dispatch-time scene-tree node id (see Self::PhaseStarting).

§name: String
§labels: String
§error: String
§

OpStarting

SRD-63 — an op-level status leaf (readout: visible) started, keyed by its parent phase’s scene-node id.

Fields

§op_name: String
§

OpMeasure

An op-level status leaf completed; duration_secs is its execution time. The op’s key measurable, arriving just before its completion.

Fields

§op_name: String
§text: String
§

OpCompleted

Fields

§op_name: String
§duration_secs: f64
§

OpFailed

An op-level status leaf failed.

Fields

§op_name: String
§error: String
§

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.

Fields

§severity: LogSeverity
§message: String
§

LatencyFrame

Latency frame ingest from the metrics scheduler. Updates the live percentile fields, the rolling histories, and each active phase’s peak trackers.

Fields

§min: u64
§p50: u64
§p90: u64
§p99: u64
§p999: u64
§max: u64
§

SparklineSamples

Sparkline samples for the throughput / secondary-counter rows. Driven from the same metrics-frame drain as LatencyFrame.

Fields

§rows: Option<f64>
§rows_label: Option<String>
§

SetMeta

Bookkeeping fields the runner sets before the run starts (profiler / limit strings shown in the header strip).

Fields

§profiler: Option<String>
§

FrameAck(Sender<()>)

Synchronous render checkpoint. Processed in command order so its position in the queue marks “all preceding mutations have been applied”. The actor:

  1. registers tx in the shared pending_acks queue,
  2. sets the force_redraw flag,
  3. 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§

Source§

impl Debug for RunStateCmd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for RunStateCmd

§

impl !UnwindSafe for RunStateCmd

§

impl Forget for RunStateCmd

§

impl Freeze for RunStateCmd
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<SceneNode>: Freeze, PhantomData<(String, u64, f64)>: Freeze, PhantomData<RelevancyLive>: Freeze, *const ArcInner<ActivityMetrics> is !null: Freeze, PhantomData<ArcInner<ActivityMetrics>>: Freeze, *const ArcInner<Vec<BakedBody>> is !null: Freeze, PhantomData<ArcInner<Vec<BakedBody>>>: Freeze, *const ArcInner<ArcSwapAny<Arc<String>>> is !null: Freeze, PhantomData<ArcInner<ArcSwapAny<Arc<String>>>>: Freeze, *const ArcInner<ArcSwapAny<Option<Arc<GutterSpec>>>> is !null: Freeze, PhantomData<ArcInner<ArcSwapAny<Option<Arc<GutterSpec>>>>>: Freeze, *const ArcInner<[String]> is !null: Freeze, PhantomData<ArcInner<[String]>>: Freeze, *mut Counter<Channel<()>>: Freeze, *mut Counter<Channel<()>>: Freeze, *mut Counter<Channel<()>>: Freeze,

§

impl Move for RunStateCmd

§

impl Send for RunStateCmd

§

impl Sync for RunStateCmd

§

impl Unpin for RunStateCmd
where *const u8 is !null: Unpin, Arc<ActivityMetrics>: Unpin, Arc<Vec<BakedBody>>: Unpin, Arc<ArcSwapAny<Arc<String>>>: Unpin, Arc<ArcSwapAny<Option<Arc<GutterSpec>>>>: Unpin, Arc<[String]>: Unpin, *mut Counter<Channel<()>>: Unpin, *mut Counter<Channel<()>>: Unpin, *mut Counter<Channel<()>>: Unpin,

§

impl UnsafeUnpin for RunStateCmd

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more