Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Issue 1215543003: Add UMA for the kernel's TCP RTT estimate. (Closed)

Created:
5 years, 6 months ago by Bryan McQuade
Modified:
5 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, asvitkine+watch_chromium.org, Jana, davidben
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add UMA for the kernel's TCP RTT estimate. This change adds UMA to log the kernel's RTT estimate at the time a connection is closed. We already log UMA for TCP connection times (see Net.TCP_Connection_Latency). This is useful, but may not capture true network RTT due to SYN retransmits. Additionally, the linux kernel continues to update its RTT estimate over the life of the TCP connection using an exponentially weighted moving average, so this estimate should be affected less by outliers than a single RTT sample from the TCP SYN. My current open questions (to net maintainers): * Is TCPClientSocket the right place to hook in for the purpose of recording round trip times? * Which Chrome connections do/do not use TCPClientSocket? Do SSL sockets use TCPClientSocket internally? What about proxy connections? Any other interesting/important cases I should be aware of here? * If TCPClientSocket is the right place to hook in, am I catching all cases where a TCPClientSocket can be closed? I hooked into the destructor and Disconnect() - are there other places where the socket can get closed that I should also be hooking? Committed: https://crrev.com/8b62f477c62822a4419298f690ae06907544f516 Cr-Commit-Position: refs/heads/master@{#337827}

Patch Set 1 #

Patch Set 2 : Also emit histogram in destructor. #

Patch Set 3 : Address comments. #

Patch Set 4 : Make method name more descriptive. #

Total comments: 28

Patch Set 5 : Address comments. #

Patch Set 6 : Address comments. #

Patch Set 7 : Add comment for tcpi_rtt==0 test. #

Total comments: 10

Patch Set 8 : Address comments. #

Total comments: 2

Patch Set 9 : Add missing TODO #

Patch Set 10 : Add WARN_UNUSED_RESULT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -7 lines) Patch
M net/socket/tcp_client_socket.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M net/socket/tcp_client_socket.cc View 1 2 3 4 5 4 chunks +13 lines, -0 lines 0 comments Download
M net/socket/tcp_socket_libevent.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M net/socket/tcp_socket_libevent.cc View 1 2 3 4 5 6 7 3 chunks +32 lines, -7 lines 0 comments Download
M net/socket/tcp_socket_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M net/socket/tcp_socket_win.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (4 generated)
Bryan McQuade
mmenke: PTAL for net code asvitkine: PTAL for histograms.xml jri, davidben: FYI
5 years, 5 months ago (2015-07-07 18:02:26 UTC) #3
Alexei Svitkine (slow)
https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc File net/socket/tcp_client_socket.cc (right): https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc#newcode358 net/socket/tcp_client_socket.cc:358: if (previously_disconnected_) { Nit: No {}'s for 1-line bodies. ...
5 years, 5 months ago (2015-07-07 18:50:56 UTC) #4
Bryan McQuade
https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc File net/socket/tcp_client_socket.cc (right): https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc#newcode358 net/socket/tcp_client_socket.cc:358: if (previously_disconnected_) { On 2015/07/07 18:50:56, Alexei Svitkine wrote: ...
5 years, 5 months ago (2015-07-07 19:35:14 UTC) #5
Alexei Svitkine (slow)
lgtm
5 years, 5 months ago (2015-07-07 19:43:35 UTC) #6
mmenke
https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc File net/socket/tcp_client_socket.cc (right): https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc#newcode184 net/socket/tcp_client_socket.cc:184: EmitTCPMetricsHistogramsOnSocketClose(); Suggest a couple things: 1) Rename this to ...
5 years, 5 months ago (2015-07-07 19:53:50 UTC) #7
Bryan McQuade
https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc File net/socket/tcp_client_socket.cc (right): https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.cc#newcode184 net/socket/tcp_client_socket.cc:184: EmitTCPMetricsHistogramsOnSocketClose(); On 2015/07/07 19:53:49, mmenke wrote: > Suggest a ...
5 years, 5 months ago (2015-07-07 21:03:33 UTC) #8
Bryan McQuade
https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.h File net/socket/tcp_client_socket.h (right): https://codereview.chromium.org/1215543003/diff/60001/net/socket/tcp_client_socket.h#newcode99 net/socket/tcp_client_socket.h:99: void EmitTCPMetricsHistogramsOnSocketClose(); On 2015/07/07 19:53:49, mmenke wrote: > Think ...
5 years, 5 months ago (2015-07-07 21:05:11 UTC) #9
mmenke
One other thing worth noting (Which you've probably already thought about): This will record one ...
5 years, 5 months ago (2015-07-07 21:27:29 UTC) #10
Bryan McQuade
Thanks for reviewing! RE: logging frequency, I agree that once at TCP connection close probably ...
5 years, 5 months ago (2015-07-08 00:35:38 UTC) #11
Bryan McQuade
https://codereview.chromium.org/1215543003/diff/120001/net/socket/tcp_socket_win.cc File net/socket/tcp_socket_win.cc (right): https://codereview.chromium.org/1215543003/diff/120001/net/socket/tcp_socket_win.cc#newcode1048 net/socket/tcp_socket_win.cc:1048: // Not implemented. Consider implementing using On 2015/07/07 21:27:29, ...
5 years, 5 months ago (2015-07-08 12:17:42 UTC) #12
Jana
Just one suggestion inline. https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h File net/socket/tcp_socket_libevent.h (right): https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h#newcode69 net/socket/tcp_socket_libevent.h:69: bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const; Since ...
5 years, 5 months ago (2015-07-08 12:33:29 UTC) #13
Bryan McQuade
https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h File net/socket/tcp_socket_libevent.h (right): https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h#newcode69 net/socket/tcp_socket_libevent.h:69: bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const; On 2015/07/08 12:33:29, Jana wrote: ...
5 years, 5 months ago (2015-07-08 13:26:07 UTC) #14
Bryan McQuade
On 2015/07/08 13:26:07, Bryan McQuade wrote: > https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h > File net/socket/tcp_socket_libevent.h (right): > > https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h#newcode69 ...
5 years, 5 months ago (2015-07-08 13:37:02 UTC) #15
mmenke
On 2015/07/08 13:26:07, Bryan McQuade wrote: > https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h > File net/socket/tcp_socket_libevent.h (right): > > https://codereview.chromium.org/1215543003/diff/140001/net/socket/tcp_socket_libevent.h#newcode69 ...
5 years, 5 months ago (2015-07-08 15:16:25 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1215543003/180001
5 years, 5 months ago (2015-07-08 15:25:00 UTC) #19
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 5 months ago (2015-07-08 16:04:01 UTC) #20
commit-bot: I haz the power
5 years, 5 months ago (2015-07-08 16:04:56 UTC) #21
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/8b62f477c62822a4419298f690ae06907544f516
Cr-Commit-Position: refs/heads/master@{#337827}

Powered by Google App Engine
This is Rietveld 408576698