Warmth of a connection (cwnd) is estimated by the amount of data written to the socket.
Choosing the warmest connection would mean faster resource load times.
idle time is the time a socket has remained idle (no http requests being served on it).
Probability of server resetting a connection increases with idle time duration.
Using a cost function that takes into account bytes transferred and idle time to pick best connection to schedule http requests on.
CODEREVIEW done in http://codereview.chromium.org/6990036/
Contributed by [email protected]
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90373
Reverted: http://codereview.chromium.org/7255002 :(
Have fixed 2 things since:
1. Removed LOG(ERROR) from http_basic_stream.cc that was causing layout tests to fail.
2. Initialized class variables in http_basic_stream.cc that was causing uninitialized memory bugs in valgrind: http://code.google.com/p/chromium/issues/detail?id=87423
Review URL: http://codereview.chromium.org/7251004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90601 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h
index 417c622..e13a12d 100644
--- a/chrome/browser/browser_main.h
+++ b/chrome/browser/browser_main.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/tracked_objects.h"
@@ -129,6 +130,9 @@
// specified timeout value is reached.
void ConnectBackupJobsFieldTrial();
+ // A/B test for warmest socket vs. most recently used socket.
+ void WarmConnectionFieldTrial();
+
// Used to initialize NSPR where appropriate.
virtual void InitializeSSL() = 0;
@@ -171,6 +175,9 @@
// Initialized in SetupMetricsAndFieldTrials.
scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_;
+ FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket);
+ FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_Random);
+ FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_Invalid);
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
};