Add metric for RTT of WebSocket ping messages.

This commit is contained in:
Joachim Bauch 2025-11-06 16:35:54 +01:00
commit 71fda2f258
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02
3 changed files with 10 additions and 0 deletions

View file

@ -353,6 +353,7 @@ func (c *Client) ReadPump() {
log.Printf("Client from %s has RTT of %d ms (%s)", addr, rtt_ms, rtt)
}
}
statsClientRTT.Observe(float64(rtt.Milliseconds()))
c.getHandler().OnRTTReceived(c, rtt)
}
return nil