subms-mpsc-queue 0.5.2

submillisecond.com cookbook recipe - concurrency: subms-mpsc-queue. Vyukov-style multi-producer single-consumer linked queue with dangling-tail handling.
Documentation
#![cfg(feature = "harness")]

use subms::{SubMsBenchAssertion, SubMsBenchParams, assert_p99_under, run_bench};
use subms_mpsc_queue::recipe::MpscQueueRecipe;

const ONE_MS_NS: u64 = 1_000_000;

#[test]
fn sub_millisecond_bench() {
    let params = SubMsBenchParams {
        entries: 40_000,
        warmup: 1_000,
        seed: 0,
    };
    let h = run_bench(&MpscQueueRecipe, &params);
    assert_p99_under(
        &h,
        &[
            SubMsBenchAssertion {
                stage: "offer",
                p99_ns_max: ONE_MS_NS,
            },
            SubMsBenchAssertion {
                stage: "poll",
                p99_ns_max: ONE_MS_NS,
            },
        ],
    )
    .unwrap();
}