Saving websocket RTT samples#232
Conversation
Also, move that measurement data into to WSInfo sub-object as it's currently unclear if AppInfo should be extended or not. It's part of ndt7 spec :) TODO: squash this commit into previous one
|
I am sorry, @darkk, I meant to update this PR to master but the end result was that I merged this PR to master, which I didn't want. Can you reopen/reissue it? My apologies 🙏 |
|
(Weirdly enough, I could merge a PR with broken CI in master without any prompt like "hey, you want merge this, you sure? You can override if you wish", which is what I'd expect @pboothe) |
|
@bassosimone I'll reopen it, but I'd like to clean the code up a bit first. I've not found a good reason to send each and every |
|
Let me take a look at the existing code and provide further feedback. |
|
@bassosimone okay, it's #234. Keep in mind that I've not finished uprooting of the inelegant 14kb channel buffer yet, so that part is yet to be refactored. |
bassosimone
left a comment
There was a problem hiding this comment.
Did read the diff, asked clarifying questions! (I think I have a slight preference for opening a new PR, because I'd rather have the discussion happen on a live PR rather than on a dead one, for future clarify.)
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
I am ignoring the JavaScript part for now.
| runPing(function() { runDownload(function() { runUpload(); }); }) | ||
| </script> | ||
| </body> | ||
| </html> |
There was a problem hiding this comment.
I am ignoring the JavaScript part for now.
| func Do(ctx context.Context, conn *websocket.Conn, resultfp *results.File) { | ||
| // arguments are owned by the caller of this function. The start argument is | ||
| // the test start time used to calculate ElapsedTime and deadlines. | ||
| func Do(ctx context.Context, conn *websocket.Conn, resultfp *results.File, start time.Time) { |
There was a problem hiding this comment.
Passing in the start time is very useful to start ensuring the same zero is used everywhere.
| ConnectionInfo *ConnectionInfo `json:",omitempty" bigquery:"-"` | ||
| BBRInfo *BBRInfo `json:",omitempty"` | ||
| TCPInfo *TCPInfo `json:",omitempty"` | ||
| WSInfo *WSInfo `json:",omitempty"` |
There was a problem hiding this comment.
This looks like PingInfo to me.
| package model | ||
|
|
||
| // WSInfo contains an application level (websocket) ping measurement data. | ||
| // It may be melded into AppInfo. |
There was a problem hiding this comment.
No, I'd rather actually keep them separate
| receiverch := receiver.StartDownloadReceiver(wholectx, conn) | ||
| measurerch := measurer.Start(wholectx, conn, resultfp.Data.UUID, start) | ||
| receiverch, pongch := receiver.StartDownloadReceiver(wholectx, conn, start, measurerch) | ||
| senderch := sender.Start(conn, measurerch, start, pongch) |
There was a problem hiding this comment.
I am confused by the fact that a new channel has been introduced. Isn't it possible to use the measurerch for passing around information? I understood that the PING is another nullable pointer within a Measurement.
| LastRTT: int64(rtt / time.Microsecond), | ||
| MinRTT: int64(minRTT / time.Microsecond), | ||
| } | ||
| pongch <- wsinfo // Liveness: buffered (sender) |
There was a problem hiding this comment.
So, here I believe it should be possible to use dst to emit a measurement containing PingInfo, right?
bassosimone
left a comment
There was a problem hiding this comment.
Asked some questions
That's WIP for #192
I have a few questions I'm unsure about:
startaround the way it's implemented? It looks a bit messy to me, but I'm quite okay with that.WSInfomessages to client in/uploadand/download? I feel like those may be eventually useful, those datapoints feed my curiosity about queuing, but I have no immediate use for the data.WSInfobe a separate optional sub-message in the spec or should it extendAppInfowith optional fields?sender(sends ping to) →[conn](eventually delivers pong to) →receiver(sends RTT estimate back to client) →sender. The current implementation uses buffered channel for RTT estimates to avoid blocking onpongch <- rttwhilesenderis blocked onconn.send(hugeBlob)feeding the pipe with data. I don't like 14kB being allocated just to handle the worst-case, but I did not come up with a more elegant solution.WIP:
download.senderto get one unbiased sample of L7 RTT for each/downloadfor "free"spec/ndt7-protocol.mdThis change is