Crate testbench

source ·
Expand description

Testing and benchmarking tools for concurrent Rust code

This crate groups together a bunch of utilities which I’ve found useful when testing and benchmarking Rust concurrency primitives in the triple_buffer and spmc_buffer crates.

If it proves popular, other testing and benchmarking tools may be added, based on user demand.

Examples

For examples of this crate at work, look at its “tests” and “benchs” submodules, which showcase expected usage.

Modules

Inlining barriers for function calls
This module contains shareable mutable containers designed for enabling and detecting race conditions in thread synchronization testing code.

Functions

Microbenchmark some simple operation by running it N times
Microbenchmark some operation while another is running in a loop
Test that running two operations concurrently works
Test that running three operations concurrently works