Skip to content

Commit

Permalink
Add a new histogram for tracking how much time is spent resolving hosts
Browse files Browse the repository at this point in the history
for QUIC sessions.

Review URL: https://codereview.chromium.org/546133002

Cr-Commit-Position: refs/heads/master@{#293747}
  • Loading branch information
rch-chromium-org authored and Commit bot committed Sep 8, 2014
1 parent 855129e commit 87e6000
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/quic/quic_stream_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -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,
Expand All @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16562,6 +16562,13 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary>
</histogram>

<histogram name="Net.QuicSession.HostResolutionTime" units="milliseconds">
<owner>rch@chromium.org</owner>
<summary>
Time spent resolving the DNS name of the server for a QUIC connection.
</summary>
</histogram>

<histogram name="Net.QuicSession.IncorrectConnectionIDsReceived">
<owner>rch@chromium.org</owner>
<summary>
Expand Down

0 comments on commit 87e6000

Please sign in to comment.