summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 22:15:54 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 22:15:54 +0000
commit32eaa332c7ef3f5480b0e5cfc4f42418a13c9189 (patch)
tree2d3155f68162a9523b1b12cbb54c8a35863664a7 /chrome/browser/net
parent26788a65a7f9094a0acd44ea69c3cdbea5b1f498 (diff)
downloadchromium_src-32eaa332c7ef3f5480b0e5cfc4f42418a13c9189.zip
chromium_src-32eaa332c7ef3f5480b0e5cfc4f42418a13c9189.tar.gz
chromium_src-32eaa332c7ef3f5480b0e5cfc4f42418a13c9189.tar.bz2
Add IPv6 probing support, and disable IPv6 resolution when it is useless
I've added minimal probing to check if IPv6 is at all possible, and when it is not, then we disable IPv6 resolution. I've also added histograms and A/B test support to evaluate the impact of this change. (I landed originally, but had tree problems, and this is a new CL to tryto reland). Note that I've switched back to MACRO style enums as well, per http://dev.chromium.org/developers/coding-style (search for "enum"). This version now does the conditional testing at a higher level (in io_thread.h), so that it should interfere less with other testing. r=wtc,eroman Review URL: http://codereview.chromium.org/585005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/dns_host_info.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/net/dns_host_info.cc b/chrome/browser/net/dns_host_info.cc
index 8946f7f..45e088b 100644
--- a/chrome/browser/net/dns_host_info.cc
+++ b/chrome/browser/net/dns_host_info.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include <string>
+#include "base/field_trial.h"
#include "base/format_macros.h"
#include "base/histogram.h"
#include "base/logging.h"
@@ -120,7 +121,18 @@ void DnsHostInfo::SetFoundState() {
state_ = FOUND;
resolve_duration_ = GetDuration();
if (kMaxNonNetworkDnsLookupDuration <= resolve_duration_) {
- UMA_HISTOGRAM_LONG_TIMES("DNS.PrefetchFoundNameL", resolve_duration_);
+ UMA_HISTOGRAM_CUSTOM_TIMES("DNS.PrefetchResolution", resolve_duration_,
+ kMaxNonNetworkDnsLookupDuration, TimeDelta::FromMinutes(15), 100);
+
+ static bool use_ipv6_histogram(FieldTrialList::Find("IPv6_Probe") &&
+ !FieldTrialList::Find("IPv6_Probe")->group_name().empty());
+ if (use_ipv6_histogram) {
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ FieldTrial::MakeName("DNS.PrefetchResolution", "IPv6_Probe"),
+ resolve_duration_, kMaxNonNetworkDnsLookupDuration,
+ TimeDelta::FromMinutes(15), 100);
+ }
+
// Record potential beneficial time, and maybe we'll get a cache hit.
// We keep the maximum, as the warming we did earlier may still be
// helping with a cache upstream in DNS resolution.