Skip to main content

run_executions

Function run_executions 

Source
pub async fn run_executions(
    session_args: &[String],
    session_observer: Arc<dyn RunObserver>,
    specs: Vec<ExecutionSpec>,
    max_concurrent: usize,
) -> Result<Vec<Result<(), String>>, String>
Expand description

SRD-88 — run N executions CONCURRENTLY in one process, all sharing ONE session, at most max_concurrent in flight. The session (SessionHost: dir / stores / cadence + scheduler services) is set up ONCE and torn down ONCE, after every execution. Each execution loads + runs its own workload, derives its own Execution (distinct allocated exec_id) under the shared session component, flushes its metrics into the shared store via CadenceReporter::quiesce without tearing the reporter down, and routes its lifecycle/log through its own observer (a scoped [ExecutionContext]). Results come back in input order.

max_concurrent == 1 is the sequential case — the SAME harness, no separate path (SRD-02 “One Concurrency Path”).