I love cargo test. It’s easy to use, easy to understand, and works pretty well. But while developing triple_buffer and spmc_buffer, I figured out that I needed a couple of extras beyond what it provides:
- Benchmarking (cargo bench is forever unstable, and even if it were stable I’m not sure it’d fit).
- Concurrent testing and benchmarking (i.e. test/benchmark some repetitive operation while another is running in a loop in the background).
Since a quick search on crates.io gave no interesting result, and the amount of required code is ultimately quite small, I decided to hack my own facilities for triple_buffer. But then I faced exactly the same issues for spmc_buffer, of course. As a temporary workaround, I went for copy-pasting the testing code of triple-buffer, but this is obviously not something I want to stay around in the long run.
The key question is thus this:
- Are there some nice libraries for concurrent testing & benchmarking that I missed on crates.io?
- Or should I roll out a new crate, and spend some extra time thinking about how I could generalize my quick and dirty test/bench code for other people’s needs?