Skip to main content

Module model

Module model 

Source
Expand description

Normalized workload model: the canonical ParsedOp representation.

All YAML shorthand forms normalize to this model. This is what driver adapters consume.

Structs§

AggregateExpr
An aggregate expression: either mean(recall) over profile~label (single-key filter form, emits one aggregate row) or mean(recall) over k,limit,optimize_for (multi-key grouping form, emits one aggregate row per distinct value-tuple).
BackoffSpec
Retry-backoff settings carried by the map form of tries: (tries: {count: N, backoff: {ratio, min, max}}). Each field is optional — a missing key falls back to the op’s standalone retry_backoff* param, then the built-in default. Durations are kept as raw strings (e.g. "100ms", "10s") and parsed at wrap time by the runtime, so this crate needs no time parser.
Checkpoint
Per-phase checkpoint declaration. Three legal forms in YAML:
ContinueIfSpec
SRD-101 — a continue_if pre-entry sweep gate declared on a comprehension-bearing scenario step or phase. A polydat when: predicate over the iteration’s COORDINATE context (end_of(p), idx_of(p), outer-scope consts like effective_max_size) plus an each: scope level. The walker evaluates it per iteration BEFORE entering the body; while it is true the iteration runs, and the moment it is false the sweep at each ends gracefully (Interrupted+Succeeded — see SRD-101 §4). Aligns with StopConditionSpec (shares when/each and the ScopedExpr machinery), but is a pre-entry gate with continue polarity and a fixed graceful effect.
DimensionSpec
A dimension a scope introduces: the label NAME whose values arrive from data, declared once at the tier that owns it.
KeyMetric
SRD-109 — one key-metric designation on an execution node: column: agg(family). Designating key metrics both names the node’s measurables and attaches the node to the table row of its nearest enclosing anchor (or the spine). family is empty for the family-less span().
MetricSpec
SRD-40b §1 schema for one synthetic-metric declaration on an op template.
OpInterface
SRD-108 Part B — the typed interface an abstract op slot declares: wires the blueprint scope guarantees (needs), wires the bound implementation must deliver via captures (yields), and wires it must deliver by projecting the result body via result: bindings (results, SRD-109 Part 3), each name -> polydat type name (u64, f64, String, vec_f32, vec_i64, …). BTreeMaps so the SRD-107 config digest serializes stably.
OptimizeBlock
SRD-86 — a phase optimize: block. The optimizer maximizes the objective wire by writing the axes input wires on the phase kernel.
ParsedOp
A normalized op template — the canonical form.
PhasePollSpec
Phase-level poll: block (SRD-75). When set on a WorkloadPhase, the runner wraps the phase’s cycle execution in a wall-clock loop that re-runs all ops per iteration until until (a Polydat boolean expression over captures) returns true or timeout_ms elapses.
ReadoutsBindings
Per-event-slot list of readout body strings declared in the workload’s readouts: block. See SRD-63 §5.0 for the three legal forms.
StopConditionSpec
SRD-83 — one stop condition declared on a shell. A polydat condition:/when: predicate over runtime-state wires (op_count, error_rate, elapsed_ms, children_failed, …); a per:/each: detection distribution selector (which scope levels it is evaluated at); a pulse: firing axis; an action:/effect: (fail → Interrupted+Failed, stop → Interrupted+Succeeded); and an at: action target scope (default = the innermost level of per:). When the predicate trips it stops the at: scope with the effect. Detection scope (per:) and action scope (at:) are independent.
SummaryConfig
Parsed summary report configuration.
ThrottleSpec
Adaptive backpressure governor parameters (SRD-83 §throttle). The governor keeps the WINDOWED attempt-failure fraction — the see-through-retries saturation signal — under high by walking the named dynamic control down multiplicatively, and recovers it toward the authored ceiling while the window stays under low.
TraverseSpec
traverse: — knobs on the result-traversal layer.
Workload
A complete workload definition after normalization.
WorkloadPhase
A workload phase: runs as a separate Activity with its own cycle count, concurrency, rate limit, and op selection.
WrappersConfig
SRD-32a Push 3 — wrapper-composition override block. Carries an explicit innermost-to-outermost order list that the resolver uses in place of its built-in default-order tiebreaker. The list must be a permutation of the wrappers the op actually triggers (after transitive activation); listing a non-triggered wrapper or omitting a triggered one is a hard error per SRD-32a §“Workload-level override”.

Enums§

AggFunction
Supported aggregation functions for summary report expressions.
BindingsDef
How bindings are defined for an op.
DaemonSpec
Daemon-fiber capacity declaration. The on-disk surface accepts multiple YAML scalar shapes (bool / int / string) that all map into this two-variant enum.
DelaySpec
Per-op delay specification. Two surface forms on YAML:
DimensionType
Declared value type of a DimensionSpec.
KeyAgg
SRD-109 — the time-dimension aggregate a key-metric designation carries. MANDATORY on every designation: there are no implied aggregates, so rows: result_success (no qualifier) is a parse error naming this vocabulary. Defined over the stored samples of one instance within the row scope’s activation window — which, per the SRD-42 amendment, are last-write-wins point samples with PromQL semantics.
LegacyResultWireSpec
MetricKind
Metric type discriminator. SRD-40b §1.
OnMissing
Policy for a capture that resolved to nothing.
PulseSpec
SRD-83 follow-up — the FIRING axis (when a condition is evaluated), as a tagged-union value so the field name can’t overclaim periodicity. continuous names the existing inline (per drain-loop turn) evaluation; phase_end names the phase-completion aggregation. A cadence value ({every: <duration>}) driving the metrics CadenceReporter registry is a later step and is intentionally NOT accepted here yet.
ResultFragment
One step of ResultSpec::walk_fragments. Either a string-shape source block (compile as a Polydat module) or a map-shape (name, source) pair (compile as a single name := source binding).
ResultSpec
SRD-66 result-bindings declaration. Vari-structured to match the three YAML shapes the user can write:
ScenarioNode
A node in a scenario execution tree.
ScopeLevel
SRD-83 — a scope-tree level a stop condition distributes to. The each: selector names one or more of these; the matter walk binds the predicate at every node of a named level inside the declaring subtree (a declared, structural fan-out — never inferred from the predicate’s content). Aligned to the executor’s ScopeKind.
ThrottleField
throttle: — adaptive backpressure governor: boolean sugar (throttle: true = all defaults) or the full spec map.

Functions§

parse_daemon_spec_value
Parse a YAML/JSON scalar into a DaemonSpec.
parse_delay_spec_value
Parse a YAML/JSON value into a DelaySpec.

Type Aliases§

ResultWireSpec
Legacy alias for backwards compatibility during Push 2. Drops once every consumer migrates to ResultSpec.
ScenarioStep
Legacy alias.