Joins the CI-regressed sim-bench sweep (S7 style: threshold const with budget+slack rationale, cfg(sim-bench) test, --test-threads=1 job). Drives the real trunk WS route through the PRODUCTION serve path (rutster::serve::serve_with_nodelay) over a real loopback socket at the real 20ms cadence. Healthy ~1-2ms; a Nagle regression stalls ~40ms+; threshold 20ms splits the regimes by an order of magnitude each way. Verified load-bearing: fails when tcp_nodelay(false) — see module doc for the Option D socket2 TCP_QUICKACK suppression that defeats the Linux loopback's quick-ACK heuristic so the assertion actually catches the Nagle regression on this runner. Signed-off-by: Aaron D. Lee <himself@adlee.work>
47 lines
2.0 KiB
TOML
47 lines
2.0 KiB
TOML
# crates/rutster-sim/Cargo.toml — the self-hostable benchmark + simulation
|
|
# harness crate (ADR-0010 spearhead step 4½). Default-off `sim-bench`
|
|
# feature gates the CI-regressed threshold sweep so the routine
|
|
# `cargo test --all` gate stays fast.
|
|
[package]
|
|
name = "rutster-sim"
|
|
version = "0.0.0"
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
repository.workspace = true
|
|
description = "Self-hostable benchmark + simulation harness (ADR-0010 spearhead step 4½)."
|
|
|
|
[dependencies]
|
|
rutster-media = { path = "../rutster-media" }
|
|
rutster = { path = "../rutster" }
|
|
rutster-tap = { path = "../rutster-tap" }
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync", "time"] }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
toml = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tracing = { workspace = true }
|
|
url = { workspace = true }
|
|
|
|
[features]
|
|
default = []
|
|
# The CI-regressed threshold sweep. Default OFF so `cargo test --all` (the
|
|
# routine gate) stays fast. A separate CI job runs
|
|
# `cargo test --all --features=sim-bench -- --test-threads=1` per spec §5.4 +
|
|
# §6.5. A latency regression fails the build the same way a broken test
|
|
# does (ADR-0010).
|
|
sim-bench = []
|
|
|
|
[dev-dependencies]
|
|
# nodelay.rs (deploy slice A §5.1): drives the real trunk WS route through
|
|
# the production serve path over a real loopback socket. Test-only — the
|
|
# sim's own harness stays mpsc-pure.
|
|
rutster-trunk = { path = "../rutster-trunk" }
|
|
rutster-call-model = { path = "../rutster-call-model" }
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync", "time", "net"] }
|
|
tokio-tungstenite = { workspace = true }
|
|
futures-util = { workspace = true }
|
|
# Option D for deploy-A §5.1: suppress the Linux loopback TCP_QUICKACK
|
|
# heuristic so the test can observe the Nagle/delayed-ACK stall. socket2
|
|
# is already in the lockfile transitively via tokio; this lifts only the
|
|
# direct dev edge for the sim-bench test. MIT OR Apache-2.0.
|
|
socket2 = { version = "0.6", features = ["all"] }
|