Commit 86f23fa
Add client and server ts information to websocket messages to surface websocket latency issues (#40827)
This PR adds the `clientTs` to the initial websocket connect message, which the sync worker uses to calculate the `client_clock_skew`, which is the difference between the client clock and server clock, plus whatever latency between client sending and server receiving the message.
We send the latest possible `serverTs` before the server `Transition` message gets sent down to the client. On the client, we can then understand how long it took for the `Transition` message to download by comparing the current client time with the `serverTs` and subtracting the `clientClockSkew`.
GitOrigin-RevId: 9b8d2693a40196a78ee08aa3e2f49c695d0172d01 parent 4f9a639 commit 86f23fa
2 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
0 commit comments