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

Unified Diff: net/base/host_resolver_impl.cc

Issue 7003090: Add histograms to measure DNS lookups for different configurations. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
===================================================================
--- net/base/host_resolver_impl.cc (revision 87899)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -660,6 +660,20 @@
category = RESOLVE_SPECULATIVE_SUCCESS;
DNS_HISTOGRAM("DNS.ResolveSpeculativeSuccess", duration);
}
+
+ // Log DNS lookups based on address_family. This will help us determine
+ // if IPv4 or IPv4/6 lookups are faster or slower.
+ switch(key_.address_family) {
+ case ADDRESS_FAMILY_IPV4:
+ DNS_HISTOGRAM("DNS.ResolveSuccess_FAMILY_IPV4", duration);
+ break;
+ case ADDRESS_FAMILY_IPV6:
+ DNS_HISTOGRAM("DNS.ResolveSuccess_FAMILY_IPV6", duration);
+ break;
+ case ADDRESS_FAMILY_UNSPECIFIED:
+ DNS_HISTOGRAM("DNS.ResolveSuccess_FAMILY_UNSPEC", duration);
+ break;
jar (doing other things) 2011/06/09 18:30:00 nit: perchance add a default: NOT_REACHED. The st
cbentzel 2011/06/09 18:47:03 I've had compiler warnings for that case [I believ
+ }
} else {
if (had_non_speculative_request_) {
category = RESOLVE_FAIL;
@@ -668,6 +682,19 @@
category = RESOLVE_SPECULATIVE_FAIL;
DNS_HISTOGRAM("DNS.ResolveSpeculativeFail", duration);
}
+ // Log DNS lookups based on address_family. This will help us determine
+ // if IPv4 or IPv4/6 lookups are faster or slower.
+ switch(key_.address_family) {
+ case ADDRESS_FAMILY_IPV4:
+ DNS_HISTOGRAM("DNS.ResolveFail_FAMILY_IPV4", duration);
+ break;
+ case ADDRESS_FAMILY_IPV6:
+ DNS_HISTOGRAM("DNS.ResolveFail_FAMILY_IPV6", duration);
+ break;
+ case ADDRESS_FAMILY_UNSPECIFIED:
+ DNS_HISTOGRAM("DNS.ResolveFail_FAMILY_UNSPEC", duration);
+ break;
+ }
UMA_HISTOGRAM_CUSTOM_ENUMERATION(kOSErrorsForGetAddrinfoHistogramName,
std::abs(os_error),
GetAllGetAddrinfoOSErrors());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698