Adds some basic benchmarking, stress tests. They still need to be properly examined to ensure they are testing the correct properties, but fit for "good enough". Implements the HybridChannel type, which features a channel buffer that can withstand overflows. It does so by providing a dequeue behind a mutex. Without overflow, will push messages into the lock free ArrayQueue implemented by crossbeam_queue; when that buffer fills, will use the locking portion provided by the Mutex<VecDequeue>. In the future we can even further optimize this, perhaps with some linked list implementations of lock-free channels, but, like the benchmarks, this fits the "good enough" bar for now. Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
11 lines
361 B
Rust
11 lines
361 B
Rust
//! Stress test suite for swactor runtime.
|
|
//!
|
|
//! Run with: cargo test --features stress stress_ -- --nocapture
|
|
//!
|
|
//! These tests are hidden behind the `stress` feature flag because they:
|
|
//! - Take longer to run
|
|
//! - Intentionally push the system to failure
|
|
//! - May produce different results on different machines
|
|
|
|
#[cfg(feature = "stress")]
|
|
mod stress;
|