irtt-rs
irtt-rs is a Rust implementation of an IRTT-compatible client.
It is not the upstream IRTT project. For the original implementation, protocol background, and broader project documentation, see:
https://github.com/heistp/irtt
Status
This repository currently provides:
irtt-rs, the canonical multi-applet binaryirtt-cli, a stream/text IRTT-compatible client appletirtt-tui, an optional terminal UI applet when built with thetuifeatureirtt-client, a Rust library for running client sessions and consuming events- finite and continuous probe runs
- human, simple, machine-readable, and RTT-only stream output modes
- optional local summary statistics
Server support is not implemented.
The installed binary is intentionally not named irtt to avoid conflicting or
confusing overlap with upstream IRTT.
Install
Requires Rust 1.75 or newer.
From a local checkout:
The default install provides the normal client-oriented binaries, including
irtt-rs and irtt-cli. To install the TUI applet as a separate binary target:
Or run it directly without installing:
For space-sensitive packaging, such as OpenWrt packages, distributors can ship
only irtt-rs and symlink or hardlink applet names such as irtt-cli,
irtt-tui, and future server applet names to it. Applet dispatch is based on
the invoked binary name.
CLI usage
Basic test:
Set duration and interval:
Run continuously:
Use a specific output mode:
With the optional TUI feature, irtt-tui opens a live cumulative dashboard for
interactive probing. It defaults to continuous probing, equivalent to
--duration 0. Quit with q or Ctrl-C; the client will drain and close the
session gracefully.
For available options:
Machine output
Use --output machine for line-oriented key=value output intended for scripts, monitoring, and autorate consumers.
Example:
Each line represents one client event and starts with an event field, for example:
event=echo_reply seq=4 remote=203.0.113.10:2112 client_send_wall_ns=1760000000000000000 client_receive_wall_ns=1760000000012400000 raw_rtt_us=12400 effective_rtt_us=12100 adjusted_rtt_us=12100 server_receive_wall_ns=1760000000006100000 server_receive_mono_ns=5000006100000 server_send_wall_ns=1760000000006400000 server_send_mono_ns=5000006400000 server_processing_us=300 client_to_server_us=6100 server_to_client_us=6000 server_received_count=5 server_received_window=0x1f dscp=0 ecn=0 kernel_rx_ns=none
Consumers should match on event=... and read the fields they need. Unknown fields should be ignored.
RTT fields are reported in microseconds. raw_rtt_us is the measured client
send-to-receive RTT. effective_rtt_us and adjusted_rtt_us are signed and may
be negative when server processing exceeds the raw RTT or timing correction
produces a negative adjusted value. When one-way delay fields are present,
client_to_server_us and server_to_client_us are also signed microseconds and
may be negative due to wall-clock skew.
For consumers that only need RTT values, use:
Library usage
irtt-client can be used directly from Rust code.
Example Cargo.toml dependency from a local checkout:
[]
= { = "crates/irtt-client" }
Minimal managed-client example:
use Duration;
use ;