summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-05 19:44:21 +0000
committerjar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-05 19:44:21 +0000
commit786a5fafa65bf9735f7e5060e126303307bb73bc (patch)
treebb5d1627a1af2d7bed7babb824925c54a6de7775 /net/base
parentbd60d73f534a1b568f7460b5ef8f4307aeb178d2 (diff)
downloadchromium_src-786a5fafa65bf9735f7e5060e126303307bb73bc.zip
chromium_src-786a5fafa65bf9735f7e5060e126303307bb73bc.tar.gz
chromium_src-786a5fafa65bf9735f7e5060e126303307bb73bc.tar.bz2
Histogram size of "final" block of SDCH compressed data.
Sample/histogram the sizes of the "final" block of SDCH compressed data. Try to understand why there is a long tail in current distribution. bug=1561947 r=huanr,kenmixter,openvcdiff Review URL: http://codereview.chromium.org/17006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/sdch_filter.cc11
-rw-r--r--net/base/sdch_filter.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/net/base/sdch_filter.cc b/net/base/sdch_filter.cc
index 4b9cf70..de15774 100644
--- a/net/base/sdch_filter.cc
+++ b/net/base/sdch_filter.cc
@@ -23,7 +23,8 @@ SdchFilter::SdchFilter()
dest_buffer_excess_index_(0),
source_bytes_(0),
output_bytes_(0),
- time_of_last_read_() {
+ time_of_last_read_(),
+ size_of_last_read_(0) {
}
SdchFilter::~SdchFilter() {
@@ -54,6 +55,10 @@ SdchFilter::~SdchFilter() {
if (PASS_THROUGH == decoding_status_)
UMA_HISTOGRAM_MEDIUM_TIMES(L"Sdch.Transit_Pass-through_Latency_M",
duration);
+ // Look at sizes of the 20% of blocks that arrive with large latency.
+ if (15 < duration.InSeconds())
+ UMA_HISTOGRAM_COUNTS(L"Sdch.Transit_Belated_Final_Block_Size",
+ size_of_last_read_);
}
}
@@ -92,8 +97,10 @@ Filter::FilterStatus SdchFilter::ReadFilteredData(char* dest_buffer,
return FILTER_ERROR;
// Don't update when we're called to just flush out our internal buffers.
- if (next_stream_data_ && stream_data_len_ > 0)
+ if (next_stream_data_ && stream_data_len_ > 0) {
time_of_last_read_ = base::Time::Now();
+ size_of_last_read_ = stream_data_len_;
+ }
if (WAITING_FOR_DICTIONARY_SELECTION == decoding_status_) {
FilterStatus status = InitializeDictionary();
diff --git a/net/base/sdch_filter.h b/net/base/sdch_filter.h
index 566d4d5..1c62202 100644
--- a/net/base/sdch_filter.h
+++ b/net/base/sdch_filter.h
@@ -99,7 +99,11 @@ class SdchFilter : public Filter {
size_t source_bytes_;
size_t output_bytes_;
+ // When was the most recent non-zero size data chunk processed?
base::Time time_of_last_read_;
+ // How large was the most recent non-zero size data chunk?
+ int size_of_last_read_;
+
DISALLOW_COPY_AND_ASSIGN(SdchFilter);
};