diff options
author | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 20:27:55 +0000 |
---|---|---|
committer | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 20:27:55 +0000 |
commit | c7ab5214396f8994d307a159ff970fbbe9fe792f (patch) | |
tree | d1af0dea6e925e2e06cf487d07add656f95c15f3 /net/udp/udp_socket_win.cc | |
parent | ac25f9e297099a699d6b9eadae6c906d68e55cf1 (diff) | |
download | chromium_src-c7ab5214396f8994d307a159ff970fbbe9fe792f.zip chromium_src-c7ab5214396f8994d307a159ff970fbbe9fe792f.tar.gz chromium_src-c7ab5214396f8994d307a159ff970fbbe9fe792f.tar.bz2 |
[net/udp] Measure the time spent in UDP closesocket on Windows.
There is suspicion that UDP closesocket could take a long time blocking the IO thread.
BUG=165382
Review URL: https://codereview.chromium.org/11833039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp/udp_socket_win.cc')
-rw-r--r-- | net/udp/udp_socket_win.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc index 662ca4c..71caf17 100644 --- a/net/udp/udp_socket_win.cc +++ b/net/udp/udp_socket_win.cc @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/metrics/histogram.h" #include "base/metrics/stats_counters.h" #include "base/posix/eintr_wrapper.h" #include "base/rand_util.h" @@ -190,7 +191,10 @@ void UDPSocketWin::Close() { recv_from_address_ = NULL; write_callback_.Reset(); + base::TimeTicks start_time = base::TimeTicks::Now(); closesocket(socket_); + UMA_HISTOGRAM_TIMES("Net.UDPSocketWinClose", + base::TimeTicks::Now() - start_time); socket_ = INVALID_SOCKET; core_->Detach(); |