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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 546133002: Add a new histogram for tracking how much time is spent resolving hosts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 003d17fd2cd8a87dfc828b3c794149f1674d5441..45c1171a015735f7c1bd6e088434ce1709e57be4 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -211,6 +211,7 @@ class QuicStreamFactory::Job {
CompletionCallback callback_;
AddressList address_list_;
base::TimeTicks disk_cache_load_start_time_;
+ base::TimeTicks dns_resolution_start_time_;
base::WeakPtrFactory<Job> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(Job);
};
@@ -315,6 +316,7 @@ int QuicStreamFactory::Job::DoResolveHost() {
}
io_state_ = STATE_RESOLVE_HOST_COMPLETE;
+ dns_resolution_start_time_ = base::TimeTicks::Now();
return host_resolver_.Resolve(
HostResolver::RequestInfo(server_id_.host_port_pair()),
DEFAULT_PRIORITY,
@@ -325,6 +327,8 @@ int QuicStreamFactory::Job::DoResolveHost() {
}
int QuicStreamFactory::Job::DoResolveHostComplete(int rv) {
+ UMA_HISTOGRAM_TIMES("Net.QuicSession.HostResolutionTime",
+ base::TimeTicks::Now() - dns_resolution_start_time_);
if (rv != OK)
return rv;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698