From 50fe83a4c82675b82d60a7d40d5f75999ba4d0fa Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Fri, 2 Oct 2026 00:03:57 +0700 Subject: [PATCH] docs(irtt-client): document caller-owned cadence --- crates/irtt-client/AGENTS.md | 3 ++- crates/irtt-client/README.md | 7 +++++++ crates/irtt-client/src/lib.rs | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/irtt-client/AGENTS.md b/crates/irtt-client/AGENTS.md index f72ba5a..e739435 100644 --- a/crates/irtt-client/AGENTS.md +++ b/crates/irtt-client/AGENTS.md @@ -127,7 +127,8 @@ remains anchored to before the send, on purpose, so the existing pre-send timeout/overflow/no-send contract is unchanged. Only the *measurement* `sent_at` moved to after the send. A `WouldBlock` `try_send` (Tokio) never samples a `sent_at`, never calls `finalize_probe_commit`'s matching -`commit_probe_sent`, and never advances the machine or schedule; each retry +`commit_probe_sent`, and never advances the machine; the managed runner advances cadence only + after an accepted send; each retry gets its own fresh pre-send anchor, and only a successful attempt's anchor and `sent_at` are ever retained. diff --git a/crates/irtt-client/README.md b/crates/irtt-client/README.md index c388e60..8bcc1ed 100644 --- a/crates/irtt-client/README.md +++ b/crates/irtt-client/README.md @@ -22,6 +22,13 @@ binaries are built on. runtime, and `BlockingManagedClient` for synchronous callers, which owns its own dedicated current-thread runtime. +`Client` and `AsyncClient` send one probe whenever called. They expose the +negotiated parameters, pending-probe status, and timeout deadlines; callers +own cadence and run duration. The managed driver provides fixed cadence, +missed-slot handling, finite runs, and staggered or burst pacing. Low-level +`EchoSent` events leave `scheduled_at` and `timer_error` absent; the managed +driver supplies those schedule measurements. + Tokio stays optional: the default build has no runtime and no Tokio dependency at all. diff --git a/crates/irtt-client/src/lib.rs b/crates/irtt-client/src/lib.rs index 83a6b4b..d1a435c 100644 --- a/crates/irtt-client/src/lib.rs +++ b/crates/irtt-client/src/lib.rs @@ -18,7 +18,10 @@ //! wants full control over its own event loop, should start from. With the //! `tokio` feature, `AsyncClient` provides the corresponding low-level Tokio //! adapter for a caller that owns a runtime and drives socket readiness -//! itself. [`managed`] sits above both: `ManagedClientTask` / +//! itself. Both adapters send one probe whenever called; callers own cadence +//! and run duration, using `negotiated_params()` after Open. [`managed`] owns +//! negotiated-interval scheduling, finite runs, and staggered/burst pacing: +//! `ManagedClientTask` / //! `ManagedClientHandle` (`tokio` feature) run and control one or more //! targets under a Tokio runtime, and `BlockingManagedClient` (`tokio` //! feature) wraps that in a synchronous owner backed by its own dedicated