Skip to main content

ActivityConfig

Struct ActivityConfig 

Source
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: usize

Number 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: usize

Maximum 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: String

Full 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: ReadoutsBindings

Resolved 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: bool

dryrun=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§

Source§

impl Default for ActivityConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, 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