dev-stress 0.1.0

High-load stress testing for Rust. Concurrency, volume, saturation. Part of the dev-* verification suite.
Documentation
  • Coverage
  • 100%
    17 out of 17 items documented1 out of 12 items with examples
  • Size
  • Source code size: 37.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 422.45 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • jamesgober/dev-stress
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jamesgober

What it does

dev-stress measures how a workload behaves when scaled up: thousands of concurrent operations, millions of iterations, sustained pressure.

It detects:

  • Throughput collapse under concurrency
  • Lock contention (via thread-time variance)
  • Latency cliff-falls
  • Sustained-load instability

It does NOT do:

Quick start

[dependencies]
dev-stress = "0.1"
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);
println!("ops/sec: {}", result.ops_per_sec());
println!("thread CV: {}", result.thread_time_cv());

let check = result.into_check_result(None);

Thread-time CV

The coefficient of variation across thread elapsed times is the clearest signal that a workload is contention-bound:

  • CV near 0: threads finished at nearly the same time. Healthy.
  • CV > 0.2: significant variance. Some threads were waiting on locks or contended resources.
  • CV > 0.5: severe contention. Investigate.

What's planned

  • Latency percentile tracking (p50/p95/p99) per operation, not just per thread.
  • Long-running soak tests with periodic checkpoint reports.
  • Memory pressure tracking.
  • CPU saturation detection.

License

Apache-2.0. See LICENSE.