refactor(client): use SignedDuration for one-way delay to support negative values

Allow one-way delay samples to represent negative values caused by wall-clock skew between client and server. Update CLI output and statistics collection to correctly handle and report these signed durations.
This commit is contained in:
Nils Andreas Svee committed 2026-05-17 23:55:01 +07:00
1 parent 0b16ee802d
commit 3b5336a487
7 files changed
+193 -19

No files matched your search

+2 -2
View File
@@ -163,10 +163,10 @@ impl ReplySample {
rtt_adjusted_ns: rtt.adjusted.map(signed_duration_ns),
send_delay_ns: one_way
.and_then(|sample| sample.client_to_server)
.map(duration_ns_i128),
.map(signed_duration_ns),
receive_delay_ns: one_way
.and_then(|sample| sample.server_to_client)
.map(duration_ns_i128),
.map(signed_duration_ns),
server_processing_ns: server_timing
.and_then(|timing| timing.processing)
.map(duration_ns_i128),