Commit c7ab5214 authored by szym@chromium.org's avatar szym@chromium.org

[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
parent ac25f9e2
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment