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

Unified Diff: net/base/sdch_filter.cc

Issue 17006: Histogram size of "final" block of SDCH compressed data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 12 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 | « net/base/sdch_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_filter.cc
===================================================================
--- net/base/sdch_filter.cc (revision 7536)
+++ net/base/sdch_filter.cc (working copy)
@@ -23,7 +23,8 @@
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 @@
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 @@
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();
« no previous file with comments | « net/base/sdch_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698