Skip to main content

iroh_netbench/
lib.rs

1//! Network quality measurements inside a caller-owned authenticated peer session.
2//!
3//! This crate is intentionally independent from file transfer and diagnostics.
4
5mod config;
6mod error;
7mod event;
8mod flow;
9mod initiator;
10mod report;
11mod responder;
12mod statistics;
13mod wire;
14
15pub use config::{NetBenchConfig, NetBenchProbeConfig};
16pub use error::{Error, Result};
17pub use event::{
18    FlowInfo, FlowStage, LatencySample, LossSample, NetBenchEvent, ThroughputDirection,
19    ThroughputSample,
20};
21pub use flow::{
22    NetBenchBidirectionalStream, NetBenchFlow, NetBenchReceiveStream, NetBenchSendStream,
23    NetBenchSession, NetBenchTelemetry,
24};
25pub use initiator::{NetBenchInitiator, NetBenchTest};
26pub use report::{
27    LatencyReport, LoadedLatencyReport, LossReport, MeasurementPathReport, NetBenchProbeReport,
28    NetBenchReport, PathKind, ThroughputReport, TransportReport,
29};
30pub use responder::{NetBenchResponder, NetBenchResponderBuilder, ThroughputPolicy};
31
32/// Current wire protocol version.
33///
34/// Increment this only for an incompatible change to encoded messages or their semantics.
35pub const PROTOCOL_VERSION: u16 = 1;
36
37/// Current JSON/report schema version.
38///
39/// While the crate is pre-1.0, report-shape changes replace the initial schema directly rather
40/// than retaining development-only schema versions or compatibility decoders.
41pub const SCHEMA_VERSION: u16 = 1;