summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 01:40:22 +0000
committerjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 01:40:22 +0000
commite08cb64009fc9f5011e1d752ec5dc08694da3911 (patch)
tree2d81eb7d2ff0becc14ddaabf99f468f2690a777e /net/base
parent4fea401af7447e1fe098b989ec07193b1b9080bf (diff)
downloadchromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.zip
chromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.tar.gz
chromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.tar.bz2
Adjust histograms to get better data for latency experiments
r=openvcdiff,huanr Review URL: http://codereview.chromium.org/11810 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/filter.cc18
-rw-r--r--net/base/sdch_filter.cc7
-rw-r--r--net/base/sdch_manager.cc2
-rw-r--r--net/base/sdch_manager.h48
4 files changed, 49 insertions, 26 deletions
diff --git a/net/base/filter.cc b/net/base/filter.cc
index 433fdcd..3069880 100644
--- a/net/base/filter.cc
+++ b/net/base/filter.cc
@@ -92,8 +92,19 @@ void Filter::FixupEncodingTypes(
return;
}
- if (!is_sdch_response)
+ if (!is_sdch_response) {
+ if (1 < encoding_types->size()) {
+ // Multiple filters were intended to only be used for SDCH (thus far!)
+ SdchManager::SdchErrorRecovery(
+ SdchManager::MULTIENCODING_FOR_NON_SDCH_REQUEST);
+ }
+ if ((1 == encoding_types->size()) &&
+ (FILTER_TYPE_SDCH == encoding_types->front())) {
+ SdchManager::SdchErrorRecovery(
+ SdchManager::SDCH_CONTENT_ENCODE_FOR_NON_SDCH_REQUEST);
+ }
return;
+ }
// If content encoding included SDCH, then everything is fine.
if (!encoding_types->empty() &&
@@ -103,8 +114,11 @@ void Filter::FixupEncodingTypes(
// payload. To handle this gracefully, we simulate the "probably" deleted
// ",gzip" by appending a tentative gzip decode, which will default to a
// no-op pass through filter if it doesn't get gzip headers where expected.
- if (1 == encoding_types->size())
+ if (1 == encoding_types->size()) {
encoding_types->push_back(FILTER_TYPE_GZIP_HELPING_SDCH);
+ SdchManager::SdchErrorRecovery(
+ SdchManager::OPTIONAL_GUNZIP_ENCODING_ADDED);
+ }
return;
}
diff --git a/net/base/sdch_filter.cc b/net/base/sdch_filter.cc
index 46e6af8..ae4d5ac 100644
--- a/net/base/sdch_filter.cc
+++ b/net/base/sdch_filter.cc
@@ -48,11 +48,12 @@ SdchFilter::~SdchFilter() {
// would DCHECK in histogram as the square of the value is summed. The
// relatively precise histogram only properly covers the range 1ms to 10
// seconds, so the discarded data would not be that readable anyway.
- if (30 >= duration.InSeconds()) {
+ if (180 >= duration.InSeconds()) {
if (DECODING_IN_PROGRESS == decoding_status_)
- UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Latency_2", duration);
+ UMA_HISTOGRAM_MEDIUM_TIMES(L"Sdch.Transit_Latency_M", duration);
if (PASS_THROUGH == decoding_status_)
- UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Pass-through_Latency_2", duration);
+ UMA_HISTOGRAM_MEDIUM_TIMES(L"Sdch.Transit_Pass-through_Latency_M",
+ duration);
}
}
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index 75d0e29..6c5bf92 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -65,7 +65,7 @@ bool SdchManager::BlacklistDomain(const GURL& url) {
if (!global_ )
return false;
std::string domain(url.host());
- UMA_HISTOGRAM_TIMES(L"Sdch.UptimeBeforeBlacklisting",
+ UMA_HISTOGRAM_MEDIUM_TIMES(L"Sdch.UptimeBeforeBlacklisting_M",
Time::Now() - FieldTrialList::application_start_time());
global_->blacklisted_domains_.insert(url.host());
return true;
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 3a8158406..92e5b47 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -56,7 +56,7 @@ class SdchManager {
enum ProblemCodes {
MIN_PROBLEM_CODE,
- // Content Decode problems.
+ // Content-encoding correction problems.
ADDED_CONTENT_ENCODING,
FIXED_CONTENT_ENCODING,
FIXED_CONTENT_ENCODINGS,
@@ -65,39 +65,47 @@ class SdchManager {
DECODE_HEADER_ERROR,
DECODE_BODY_ERROR,
+ // More content-encoding correction problems.
+ OPTIONAL_GUNZIP_ENCODING_ADDED,
+
// Dictionary selection for use problems.
DICTIONARY_FOUND_HAS_WRONG_DOMAIN = 10,
- DICTIONARY_FOUND_HAS_WRONG_PORT_LIST,
- DICTIONARY_FOUND_HAS_WRONG_PATH,
- DICTIONARY_FOUND_HAS_WRONG_SCHEME,
- DICTIONARY_HASH_NOT_FOUND,
- DICTIONARY_HASH_MALFORMED,
+ DICTIONARY_FOUND_HAS_WRONG_PORT_LIST = 11,
+ DICTIONARY_FOUND_HAS_WRONG_PATH = 12,
+ DICTIONARY_FOUND_HAS_WRONG_SCHEME = 13,
+ DICTIONARY_HASH_NOT_FOUND = 14,
+ DICTIONARY_HASH_MALFORMED = 15,
// Decode recovery methods.
- META_REFRESH_RECOVERY,
- PASSING_THROUGH_NON_SDCH,
- UNRECOVERABLE_ERROR,
+ META_REFRESH_RECOVERY = 16,
+ PASSING_THROUGH_NON_SDCH = 17,
+ UNRECOVERABLE_ERROR = 18,
// Dictionary saving problems.
DICTIONARY_HAS_NO_HEADER = 20,
- DICTIONARY_HEADER_LINE_MISSING_COLON,
- DICTIONARY_MISSING_DOMAIN_SPECIFIER,
- DICTIONARY_SPECIFIES_TOP_LEVEL_DOMAIN,
- DICTIONARY_DOMAIN_NOT_MATCHING_SOURCE_URL,
- DICTIONARY_PORT_NOT_MATCHING_SOURCE_URL,
- DICTIONARY_HAS_NO_TEXT,
+ DICTIONARY_HEADER_LINE_MISSING_COLON = 21,
+ DICTIONARY_MISSING_DOMAIN_SPECIFIER = 22,
+ DICTIONARY_SPECIFIES_TOP_LEVEL_DOMAIN = 23,
+ DICTIONARY_DOMAIN_NOT_MATCHING_SOURCE_URL = 24,
+ DICTIONARY_PORT_NOT_MATCHING_SOURCE_URL = 25,
+ DICTIONARY_HAS_NO_TEXT = 26,
// Dictionary loading problems.
DICTIONARY_LOAD_ATTEMPT_FROM_DIFFERENT_HOST = 30,
- DICTIONARY_SELECTED_FOR_SSL,
- DICTIONARY_ALREADY_LOADED,
- DICTIONARY_SELECTED_FROM_NON_HTTP,
- DICTIONARY_IS_TOO_LARGE,
- DICTIONARY_COUNT_EXCEEDED,
+ DICTIONARY_SELECTED_FOR_SSL = 31,
+ DICTIONARY_ALREADY_LOADED = 32,
+ DICTIONARY_SELECTED_FROM_NON_HTTP = 33,
+ DICTIONARY_IS_TOO_LARGE= 34,
+ DICTIONARY_COUNT_EXCEEDED = 35,
// Failsafe hack.
ATTEMPT_TO_DECODE_NON_HTTP_DATA = 40,
+
+ // Content-Encoding problems detected, with no action taken.
+ MULTIENCODING_FOR_NON_SDCH_REQUEST = 50,
+ SDCH_CONTENT_ENCODE_FOR_NON_SDCH_REQUEST = 51,
+
MAX_PROBLEM_CODE // Used to bound histogram.
};