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

Unified Diff: net/http/http_network_transaction.cc

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/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
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 86260)
+++ net/http/http_network_transaction.cc (working copy)
@@ -1075,6 +1075,18 @@
total_duration,
base::TimeDelta::FromMilliseconds(1),
base::TimeDelta::FromMinutes(10), 100);
+
+ int num_kb = stream_->GetBytesReceived() / 1024;
willchan no longer on Chromium 2011/06/06 10:57:36 I think the way you have this structured isn't wha
Gagan 2011/06/06 20:27:10 Good point. Done.
+ if (num_kb < 1024 && stream_->GetRTTMs() > 0) { // Ignore responses > 1MB
+ double num_rtt = static_cast<double>(duration.InMilliseconds()) /
+ stream_->GetRTTMs();
+ int num_rtt_scaled = (4 * num_rtt);
+ int val = 1024 * num_rtt_scaled + num_kb; // Supports ~500 RTT of 1418 B.
+ HISTOGRAM_CUSTOM_COUNTS("Net.RTT_vs_KB", val, 4096, 3048000, 1000);
+ LOG(ERROR) << "rtt = " << stream_->GetRTTMs() << "\tnum_rtt = " << num_rtt
+ << "\tnum_kb = " << num_kb << "\tval = " << val;
+ }
+
if (!stream_->IsConnectionReused()) {
UMA_HISTOGRAM_CLIPPED_TIMES(
"Net.Transaction_Latency_Total_New_Connection_Under_10",

Powered by Google App Engine
This is Rietveld 408576698