pub struct WorkloadDriver { /* private fields */ }Implementations§
Source§impl WorkloadDriver
impl WorkloadDriver
pub fn new_trace(trace: Trace, engine_block_size: usize) -> Result<Self>
pub fn new_trace_without_replay_hashes( trace: Trace, engine_block_size: usize, accumulate_session_deltas: bool, ) -> Result<Self>
pub fn new_trace_accumulating_deltas( trace: Trace, engine_block_size: usize, ) -> Result<Self>
Sourcepub fn new_concurrency(
trace: Trace,
engine_block_size: usize,
max_in_flight: usize,
) -> Result<Self>
pub fn new_concurrency( trace: Trace, engine_block_size: usize, max_in_flight: usize, ) -> Result<Self>
Build a closed-loop concurrency driver. max_in_flight is the session cap
(depth-first): a session holds its slot across all turns + think-time, and new
sessions are admitted only while fewer than max_in_flight are active.
pub fn new_concurrency_without_replay_hashes( trace: Trace, engine_block_size: usize, max_in_flight: usize, accumulate_session_deltas: bool, ) -> Result<Self>
pub fn new_concurrency_accumulating_deltas( trace: Trace, engine_block_size: usize, max_in_flight: usize, ) -> Result<Self>
pub fn new_agentic_trace( trace: AgenticTrace, engine_block_size: usize, ) -> Result<Self>
pub fn new_agentic_trace_without_replay_hashes( trace: AgenticTrace, engine_block_size: usize, ) -> Result<Self>
Sourcepub fn with_deterministic_request_ids(self, first_id: u128) -> Self
pub fn with_deterministic_request_ids(self, first_id: u128) -> Self
Use stable monotonically increasing UUIDs for canonical replay.
Callers must opt in through crate::replay::ReplayDeterminism::CanonicalV1.
pub fn without_session_metadata(self) -> Self
Sourcepub fn release_cap_slot(&mut self, request_uuid: Uuid, now_ms: f64)
pub fn release_cap_slot(&mut self, request_uuid: Uuid, now_ms: f64)
Failure-path companion: release a cap slot and terminate the owning session.
No-op if on_complete already ran. Used when a request task is cancelled
or panics before reaching on_complete.
Terminating the session (marking it exhausted) prevents run_workload from
deadlocking: pop_ready skips sessions with in_flight.is_some(), so a
leaked session would leave is_drained stuck at false forever.