From 64df93dbb65809d8b7b75ddd10cd7570cfe30d78 Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Sun, 3 May 2026 16:10:51 +0700 Subject: [PATCH] feat(cli): add support for midpoint timestamps and received stats --- crates/irtt-cli/src/lib.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/crates/irtt-cli/src/lib.rs b/crates/irtt-cli/src/lib.rs index 57e4294..594cd11 100644 --- a/crates/irtt-cli/src/lib.rs +++ b/crates/irtt-cli/src/lib.rs @@ -93,6 +93,7 @@ pub enum TimestampArg { Send, Receive, Both, + Midpoint, } impl From for StampAt { @@ -102,6 +103,26 @@ impl From for StampAt { TimestampArg::Send => Self::Send, TimestampArg::Receive => Self::Receive, TimestampArg::Both => Self::Both, + TimestampArg::Midpoint => Self::Midpoint, + } + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)] +pub enum ReceivedStatsArg { + None, + Count, + Window, + Both, +} + +impl From for ReceivedStats { + fn from(value: ReceivedStatsArg) -> Self { + match value { + ReceivedStatsArg::None => Self::None, + ReceivedStatsArg::Count => Self::Count, + ReceivedStatsArg::Window => Self::Window, + ReceivedStatsArg::Both => Self::Both, } } }