pub struct ActivityConfig {Show 22 fields
pub name: String,
pub cycles: u64,
pub concurrency: usize,
pub rate: Option<f64>,
pub sequencer: SequencerType,
pub error_spec: String,
pub error_rate_max: Option<f64>,
pub stop_when: Vec<StopConditionDecl>,
pub throttle: Option<ThrottleSpec>,
pub tries: Option<u32>,
pub tries_backoff: Option<BackoffSpec>,
pub stanza_concurrency: usize,
pub source_factory: Option<Arc<dyn DataSourceFactory>>,
pub suppress_status_line: Arc<AtomicBool>,
pub status_metrics: Vec<String>,
pub phase_labels: String,
pub phase_seq: Option<(usize, usize)>,
pub readouts: ReadoutsBindings,
pub cli_readout_override: Option<String>,
pub snapshot_writer: Option<Arc<Mutex<Option<SqliteReporter>>>>,
pub dry_run_mode: Option<String>,
pub stop_after_dispenser_init: bool,
}Expand description
Configuration for an activity.
Fields§
§name: String§cycles: u64§concurrency: usizeNumber of fibers (tokio tasks) executing stanzas concurrently.
rate: Option<f64>Target ops/sec for the single activity-level rate
limiter. None disables rate limiting. There is one
rate limiter per activity — no separate stanza-rate
mechanism.
sequencer: SequencerType§error_spec: String§error_rate_max: Option<f64>Error-rate circuit breaker: fail the phase early when the
fraction of errored ops exceeds this threshold (e.g. 0.1
= 10%). Evaluated only after at least
[ERROR_RATE_MIN_OPS] ops so a small phase can’t trip on a
single error. None disables it; a value >= 1.0 also
effectively disables it (the rate never exceeds 1.0).
Resolved per phase as the workload’s error_rate_max: field
over the session-wide default. Installed as the default SRD-83
stop condition (error_rate > error_rate_max).
stop_when: Vec<StopConditionDecl>SRD-83 — the phase’s declared stop-condition predicates (the
when: of each stop_when: entry). Compiled into scope-bound
ScopedPredicates alongside the default error-rate condition and
evaluated per tick.
throttle: Option<ThrottleSpec>SRD-83 §throttle — the phase’s adaptive backpressure governor
spec: keep the windowed attempt-failure fraction under a bound
by walking a dynamic control (concurrency/rate). Evaluated
on the same drain-loop tick as the stop conditions.
tries: Option<u32>Inherited total-attempts budget for this activity’s ops (phase
tries: or the workload-root tries param). An op’s own tries:
field overrides it. None = no budget in scope → ops WITHOUT their
own tries: run single-attempt with no tries wrapper (SRD-82 Part 3b
sigil). 0 = ops fail without executing; 1 = explicit
single-attempt.
tries_backoff: Option<BackoffSpec>Retry-backoff overrides from the phase-level tries: map form
(tries: {count, backoff: {ratio, min, max}}). None = none
declared at the phase → the tries wrapper falls back to the op’s
standalone retry_backoff* params, then the built-in defaults.
stanza_concurrency: usizeMaximum number of ops within a stanza that execute concurrently.
source_factory: Option<Arc<dyn DataSourceFactory>>Source factory for data-driven phases. When present, fibers pull
from this source instead of the cycle counter. Each fiber creates
its own reader via create_reader().
suppress_status_line: Arc<AtomicBool>Suppress the inline stderr progress line (TUI handles
display). Wrapped in Arc<AtomicBool> so the runner can
flip it at runtime — when the user dismisses the TUI
mid-run (q keypress), this flag drops to false and
the status thread resumes emission, making the
experience feel like tui=off was set from the start.
A bare bool would have baked the TUI-mode value in at
activity construction, so post-dismissal there’d be no
progress display at all.
status_metrics: Vec<String>Names of relevancy / live aggregate metrics to surface on
the inline progress line and the per-phase ✓ DONE summary.
Empty → no extra metrics are shown (status line carries
only the universal counters). Set per-phase via the YAML
status_metrics: [name] field; workload-level phases that
compute relevancy must opt in explicitly — nothing is
presumed to be present.
phase_labels: StringFull root-first coordinate label (e.g.
(profile=label_00), (bucket=1, kind=READ)) for this
phase’s iteration. Used by the ✓ DONE summary line to
show the same identity the per-phase header would carry,
so the completed-status line stands alone — no separate
phase-starting row needed.
phase_seq: Option<(usize, usize)>Pre-map sequence number [N/total] for this phase. Same
numbering the TUI tree row and post-run summary use.
None ⇒ inline-CLI form / pre-map didn’t produce a seq.
readouts: ReadoutsBindingsResolved readouts: slot bindings from the workload
(SRD-63 §5). Empty → all slots fall through to the
hard-coded built-in defaults (phase_outcome at
on_phase_end, phase_status at on_update).
cli_readout_override: Option<String>CLI --readout=<body> override (SRD-63 §8).
Applies to the on_update slot only; replaces
(or with + prefix, appends to) whatever the
workload + default path resolved.
snapshot_writer: Option<Arc<Mutex<Option<SqliteReporter>>>>Per-session SQLite writer. Used by Push 6’s snapshot
store — every binder.fire captures its rendered
output via upsert_readout_snapshot so replay /
scrollback can reproduce the line later. None
means snapshot capture is skipped (no session db
— short test fixtures, in-memory sessions).
dry_run_mode: Option<String>Session-level dryrun mode (silent / emit / json),
or None for a normal run.
dryrun=cycle means full construction of an executable
cycle path — real adapter, real cluster connection, real
prepared statements, real metadata — and then suppression
of only the outbound execute() at cycle time via the
outermost DryRunWrapper. The wrapper is triggered by an
injected dryrun: op-template parameter, and this field is
the signal that drives that injection. There is no
substitution of the adapter itself; the adapter lifecycle
runs end-to-end, so the typed lvalue contract the adapter
reifies at map_op time (CQL: prepare + metadata) is
available under dryrun exactly as it is under a real run.
stop_after_dispenser_init: booldryrun=dispenser: when true, run_with_adapters
returns cleanly after every op template’s dispenser is
constructed (adapter map_op fires, the wrapper plan
resolves and wraps, the per-template pull plan seals).
No fiber pool is spawned, no cycles run. Lets the
operator verify the full construction pipeline ran
without paying any per-cycle cost.
Set from ExecCtx::diag.depth at phase-attach time —
< Cycle flips this on, >= Cycle leaves it off.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ActivityConfig
impl !UnwindSafe for ActivityConfig
impl Freeze for ActivityConfig
impl Send for ActivityConfig
impl Sync for ActivityConfig
impl Unpin for ActivityConfig
impl UnsafeUnpin for ActivityConfig
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