run

Function run 

Source
pub fn run<R: Rng + Send + 'static>(
    rng: R,
    intake_addr: &str,
    context_count: usize,
    limit_bytes: usize,
    count: usize,
    sockets: Vec<UnixDatagram>,
) -> Result<Stats>
Expand description

Pull context_count contexts from the intake pool at intake_addr once, then drive count datagrams to every socket from that one pull, each datagram a fresh per-occurrence render of every context that fits under limit_bytes, blocking through transient backpressure so every datagram reaches every socket. context_count, count, and limit_bytes come from a load generator’s crate::config::DriverConfig, so a datagram never truncates on receive.

An unreachable pool ends the run with an empty Stats rather than an error, so a driver that cannot reach the intake for its whole fetch budget degrades to a no-op. A peer that leaves mid-batch, or backpressure that outlasts the retry budget, ends the run early with a partial Stats.

§Errors

Errors if a worker thread panics, or if a reachable pool serves no contexts. Sustained backpressure is reported via Stats::timed_out, not as an error.