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:
4 files changed
+11
-9
No files matched your search
@@ -201,9 +201,8 @@ impl Client {
|
||||
payload: vec![],
|
||||
};
|
||||
let packet = encode_echo_request(&request, self.config.hmac_key.as_deref())?;
|
||||
self.socket.send(&packet)?;
|
||||
|
||||
let sent_at = override_ts.unwrap_or_else(ClientTimestamp::now);
|
||||
self.socket.send(&packet)?;
|
||||
|
||||
let session = self
|
||||
.session
|
||||
|
||||
Reference in new issue
Block a user