Skip to main content

Crate dev_stress

Crate dev_stress 

Source
Expand description

§dev-stress

High-load stress testing for Rust. Concurrency, volume, saturation under pressure. Part of the dev-* verification suite.

dev-stress is the answer to “does this code survive real load?” Not “is it fast” (that’s dev-bench). Not “does it deadlock” (that’s dev-async). Not “does it recover from failure” (that’s dev-chaos).

dev-stress measures how a workload behaves when the inputs scale up: thousands of concurrent operations, millions of iterations, sustained pressure. It detects throughput collapse, latency cliff-falls, and lock contention.

§Quick example

use dev_stress::{Workload, StressRun};

#[derive(Clone)]
struct MyWorkload;
impl Workload for MyWorkload {
    fn run_once(&self) {
        std::hint::black_box(40 + 2);
    }
}

let run = StressRun::new("hot_path")
    .iterations(100_000)
    .threads(8);

let result = run.execute(&MyWorkload);
let check = result.into_check_result(None);

Structs§

StressResult
Result of a stress run.
StressRun
Configuration for a stress run.

Traits§

Workload
A workload that can be executed many times under stress.