Commit 14a6872e authored by Tarun Bansal's avatar Tarun Bansal Committed by Commit Bot

Change default params for ECT 3G

Experiment results: https://docs.google.com/document/d/18lCPpkgPGEPvsZtbGzowvRjZSKevEYfknCr_G9hdFLA/edit?usp=sharing
Set the max delayable requests to 8 and the multiplier
to 3.0.

Change-Id: I2ae974becd8a27b168e30ecd1e24809c19ba5500
Bug: 746640
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578359Reviewed-by: default avatarDoug Arnett <dougarnett@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653417}
parent af4b7165
...@@ -63,12 +63,11 @@ GetParamsForNetworkQualityContainer() { ...@@ -63,12 +63,11 @@ GetParamsForNetworkQualityContainer() {
ResourceSchedulerParamsManager::ParamsForNetworkQuality( ResourceSchedulerParamsManager::ParamsForNetworkQuality(
8, 3.0, true /* delay_requests_on_multiplexed_connections */, 8, 3.0, true /* delay_requests_on_multiplexed_connections */,
base::nullopt))); base::nullopt)));
result.emplace( result.emplace(std::make_pair(
std::make_pair(net::EFFECTIVE_CONNECTION_TYPE_3G, net::EFFECTIVE_CONNECTION_TYPE_3G,
ResourceSchedulerParamsManager::ParamsForNetworkQuality( ResourceSchedulerParamsManager::ParamsForNetworkQuality(
kDefaultMaxNumDelayableRequestsPerClient, 0.0, 8, 3.0, true /* delay_requests_on_multiplexed_connections */,
true /* delay_requests_on_multiplexed_connections */, base::nullopt)));
base::nullopt)));
for (int config_param_index = 1; config_param_index <= 20; for (int config_param_index = 1; config_param_index <= 20;
++config_param_index) { ++config_param_index) {
......
...@@ -116,11 +116,11 @@ class ResourceSchedulerParamsManagerTest : public testing::Test { ...@@ -116,11 +116,11 @@ class ResourceSchedulerParamsManagerTest : public testing::Test {
return; return;
case net::EFFECTIVE_CONNECTION_TYPE_3G: case net::EFFECTIVE_CONNECTION_TYPE_3G:
EXPECT_EQ(10u, resource_scheduler_params_manager EXPECT_EQ(8u, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType( .GetParamsForEffectiveConnectionType(
effective_connection_type) effective_connection_type)
.max_delayable_requests); .max_delayable_requests);
EXPECT_EQ(0.0, resource_scheduler_params_manager EXPECT_EQ(3.0, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType( .GetParamsForEffectiveConnectionType(
effective_connection_type) effective_connection_type)
.non_delayable_weight); .non_delayable_weight);
...@@ -190,7 +190,8 @@ TEST_F(ResourceSchedulerParamsManagerTest, ...@@ -190,7 +190,8 @@ TEST_F(ResourceSchedulerParamsManagerTest,
net::EffectiveConnectionType ect = net::EffectiveConnectionType ect =
static_cast<net::EffectiveConnectionType>(effective_connection_type); static_cast<net::EffectiveConnectionType>(effective_connection_type);
if (effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G || if (effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G ||
effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_2G) { effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_2G ||
effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_3G) {
EXPECT_EQ(8u, resource_scheduler_params_manager EXPECT_EQ(8u, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect) .GetParamsForEffectiveConnectionType(ect)
.max_delayable_requests); .max_delayable_requests);
...@@ -204,20 +205,6 @@ TEST_F(ResourceSchedulerParamsManagerTest, ...@@ -204,20 +205,6 @@ TEST_F(ResourceSchedulerParamsManagerTest,
.GetParamsForEffectiveConnectionType(ect) .GetParamsForEffectiveConnectionType(ect)
.max_queuing_time.has_value()); .max_queuing_time.has_value());
} else if (effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_3G) {
EXPECT_EQ(10u, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect)
.max_delayable_requests);
EXPECT_EQ(0.0, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect)
.non_delayable_weight);
EXPECT_TRUE(resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect)
.delay_requests_on_multiplexed_connections);
EXPECT_TRUE(resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect)
.max_queuing_time.has_value());
} else { } else {
VerifyDefaultParams( VerifyDefaultParams(
resource_scheduler_params_manager, resource_scheduler_params_manager,
...@@ -262,10 +249,10 @@ TEST_F(ResourceSchedulerParamsManagerTest, MaxQueuingTime) { ...@@ -262,10 +249,10 @@ TEST_F(ResourceSchedulerParamsManagerTest, MaxQueuingTime) {
.max_queuing_time); .max_queuing_time);
} else if (effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_3G) { } else if (effective_connection_type == net::EFFECTIVE_CONNECTION_TYPE_3G) {
EXPECT_EQ(10u, resource_scheduler_params_manager EXPECT_EQ(8u, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect) .GetParamsForEffectiveConnectionType(ect)
.max_delayable_requests); .max_delayable_requests);
EXPECT_EQ(0.0, resource_scheduler_params_manager EXPECT_EQ(3.0, resource_scheduler_params_manager
.GetParamsForEffectiveConnectionType(ect) .GetParamsForEffectiveConnectionType(ect)
.non_delayable_weight); .non_delayable_weight);
EXPECT_TRUE(resource_scheduler_params_manager EXPECT_TRUE(resource_scheduler_params_manager
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment