refactor(client): capture send timestamp before socket call

Record the send timestamp immediately before the socket operation to include local enqueue overhead in RTT measurements, providing more conservative latency data for consumers.
This commit is contained in:
Nils Andreas Svee committed 2026-04-28 22:38:08 +07:00
1 parent 6782f7b741
commit 899506dc64
4 files changed
+11 -9

No files matched your search

+4 -2
View File
@@ -558,7 +558,7 @@ It should only:
- maintain absolute send schedule
- prepare outgoing packets before deadline where possible
- send packets
- timestamp successful sends immediately after send returns
- timestamp immediately before send call
- report compact sent records to coordinator
### Receiver Thread
@@ -845,7 +845,9 @@ The server is authoritative unless the caller explicitly requires exact or bound
## Send Timestamp
Capture send timestamp immediately after `send` returns.
Capture send timestamp immediately before the `send` call. This ensures the
measured RTT includes local send/enqueue overhead, which is the more
conservative direction for latency-control consumers.
## Receive Timestamp