pub struct StderrObserver {
pub min_level: LogLevel,
}Expand description
Default observer: prints to stderr.
min_level controls the minimum severity that reaches
stderr — Info by default, matching the TUI log panel’s
default filter (so high-cadence Debug instrumentation
doesn’t drown the signal in either mode). Override via
loglevel=debug|info|warn|error on the workload command
line. The async log sink (session.log) still receives
every level regardless of this filter.
Fields§
§min_level: LogLevelImplementations§
Source§impl StderrObserver
impl StderrObserver
Sourcepub fn with_min_level(min_level: LogLevel) -> Self
pub fn with_min_level(min_level: LogLevel) -> Self
Build a stderr observer with the given min severity.
Trait Implementations§
Source§impl Default for StderrObserver
impl Default for StderrObserver
Source§impl RunObserver for StderrObserver
impl RunObserver for StderrObserver
Source§fn phase_starting(
&self,
_scene_node_id: SceneNodeId,
name: &str,
_labels: &str,
op_templates: usize,
total_cycles: u64,
concurrency: usize,
)
fn phase_starting( &self, _scene_node_id: SceneNodeId, name: &str, _labels: &str, op_templates: usize, total_cycles: u64, concurrency: usize, )
A phase is about to start executing. Read more
Source§fn phase_completed(
&self,
_scene_node_id: SceneNodeId,
_name: &str,
_labels: &str,
_duration_secs: f64,
)
fn phase_completed( &self, _scene_node_id: SceneNodeId, _name: &str, _labels: &str, _duration_secs: f64, )
A phase completed successfully.
scene_node_id keys the
node to flip (see Self::phase_starting).Source§fn phase_failed(
&self,
_scene_node_id: SceneNodeId,
_name: &str,
_labels: &str,
_error: &str,
)
fn phase_failed( &self, _scene_node_id: SceneNodeId, _name: &str, _labels: &str, _error: &str, )
A phase failed.
scene_node_id keys the node to flip (see
Self::phase_starting).Source§fn phase_progress(&self, _update: &PhaseProgressUpdate)
fn phase_progress(&self, _update: &PhaseProgressUpdate)
Update live metrics for the active phase (called at progress tick rate).
Source§fn run_finished(&self)
fn run_finished(&self)
The entire run is complete.
Source§fn log(&self, level: LogLevel, message: &str)
fn log(&self, level: LogLevel, message: &str)
Diagnostic log message. Routed to stderr in CLI mode,
to a ring buffer in TUI mode. All
eprintln! in the
runtime should go through this instead.Source§fn sysmon_update(&self, _sample: &SysmonSample)
fn sysmon_update(&self, _sample: &SysmonSample)
A completed sysmon sample window (session-level host utilization).
Display surfaces override; everything else ignores it.
Source§fn session_dir_ready(&self, _dir: &Path)
fn session_dir_ready(&self, _dir: &Path)
The session directory now exists. Display surfaces that persist a
transcript open it here — the runner creates the directory well after
the observer is built, so this is the first moment the path is known.
Source§fn op_starting(&self, _parent_phase: SceneNodeId, _op_name: &str)
fn op_starting(&self, _parent_phase: SceneNodeId, _op_name: &str)
SRD-63 — an op-level execution leaf became visible (
readout: visible,
enabled by the readout wrapper). Nests under parent_phase in the
hierarchic status view; the consumer assigns its sequence within the
phase from arrival order. Default no-op so observers that don’t render
op-level leaves (and the zero-cost non-readout path) are unaffected.Source§fn op_completed(
&self,
_parent_phase: SceneNodeId,
_op_name: &str,
_duration_secs: f64,
)
fn op_completed( &self, _parent_phase: SceneNodeId, _op_name: &str, _duration_secs: f64, )
An op-level execution leaf completed.
duration_secs is the op’s own
cumulative execution time. Default no-op.Source§fn op_measure(&self, _parent_phase: SceneNodeId, _op_name: &str, _text: &str)
fn op_measure(&self, _parent_phase: SceneNodeId, _op_name: &str, _text: &str)
The op’s KEY MEASURABLE, rendered from its
measure: template at
completion — “12 sstables”, “1.4 GiB”, “98.1%”. Read moreSource§fn op_failed(&self, _parent_phase: SceneNodeId, _op_name: &str, _error: &str)
fn op_failed(&self, _parent_phase: SceneNodeId, _op_name: &str, _error: &str)
An op-level execution leaf failed. Default no-op.
Source§fn phase_render_attach(&self, _handle: PhaseRenderHandle)
fn phase_render_attach(&self, _handle: PhaseRenderHandle)
SRD-100 P2 — attach the per-phase
PhaseRenderHandle to the live
display fold, once, after the activity’s metrics/binder exist
(the executor calls this on-task at progress-setup time). Observers
that own a run-state actor (TUI / log-only) route it to an
AttachPhaseRender mutation so the consumer can fold active_phases
and re-derive each phase’s status line itself; the no-op default is
correct for surfaces with no live status fold (Stderr / Headless).Source§fn suppresses_stderr(&self) -> bool
fn suppresses_stderr(&self) -> bool
Whether to suppress the inline stderr progress line
(because the TUI is handling display).
Source§fn live_suppress_flag(&self) -> Option<Arc<AtomicBool>>
fn live_suppress_flag(&self) -> Option<Arc<AtomicBool>>
Optional shared flag mirroring
Self::suppresses_stderr
that the runner threads into long-lived components
(e.g. the activity’s inline status thread) so they can
react to dismissal mid-run rather than honoring a
snapshot taken at construction. When None, the
activity uses a fresh AtomicBool(false) (never
suppress). Implementations that go through a TUI
(and only those) typically expose their internal
“tui_active” flag here.Source§fn reporter(&self) -> Option<Box<dyn Reporter>>
fn reporter(&self) -> Option<Box<dyn Reporter>>
Optional reporter to register on the metrics scheduler.
The runner calls this once during setup. Return None for
observers that don’t need metrics frames (like StderrObserver). Read more
Source§fn reporters(&self) -> Vec<(Duration, Box<dyn Reporter>)>
fn reporters(&self) -> Vec<(Duration, Box<dyn Reporter>)>
Multiple reporters with explicit cadences. The runner calls
this once during setup. Each
(interval, reporter) entry is
registered with the scheduler at that interval. The default
implementation returns whatever [reporter] produced at the
base 1s cadence, so existing observers work unchanged.Source§fn cadences(&self) -> Option<Cadences>
fn cadences(&self) -> Option<Cadences>
User-declared cadences for this observer’s consumers (SRD-42). Read more
Source§fn on_metrics_query(&self, _query: Arc<MetricsQuery>)
fn on_metrics_query(&self, _query: Arc<MetricsQuery>)
Callback invoked once the runner has built the shared
nmbrs_metrics::metrics_query::MetricsQuery. Observers that
render metrics (TUI, CLI status) capture this handle to read
cadence windows, now values, and session-lifetime aggregates.Source§fn scenario_pre_mapped(&self, _tree: &SceneTree)
fn scenario_pre_mapped(&self, _tree: &SceneTree)
Pre-populated scenario tree. Read more
Auto Trait Implementations§
impl Freeze for StderrObserver
impl RefUnwindSafe for StderrObserver
impl Send for StderrObserver
impl Sync for StderrObserver
impl Unpin for StderrObserver
impl UnsafeUnpin for StderrObserver
impl UnwindSafe for StderrObserver
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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