Commit d7c678c0 authored by Zhongyi Shi's avatar Zhongyi Shi Committed by Commit Bot

Add a new migration cause: network connected post path degrading.

This separates cases out from connection migration on path degrading
and helps collect data on how often a new network is connected after
path degrading is detected.

Change-Id: I36dc7306d6b94c84a85ffceb61a91645b312650f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888952
Auto-Submit: Zhongyi Shi <zhongyi@chromium.org>
Reviewed-by: default avatarRyan Hamilton <rch@chromium.org>
Commit-Queue: Ryan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710805}
parent 879e2cc1
...@@ -209,6 +209,8 @@ std::string MigrationCauseToString(MigrationCause cause) { ...@@ -209,6 +209,8 @@ std::string MigrationCauseToString(MigrationCause cause) {
return "OnPathDegrading"; return "OnPathDegrading";
case CHANGE_PORT_ON_PATH_DEGRADING: case CHANGE_PORT_ON_PATH_DEGRADING:
return "ChangePortOnPathDegrading"; return "ChangePortOnPathDegrading";
case NEW_NETWORK_CONNECTED_POST_PATH_DEGRADING:
return "NewNetworkConnectedPostPathDegrading";
default: default:
QUIC_NOTREACHED(); QUIC_NOTREACHED();
break; break;
...@@ -2083,7 +2085,7 @@ void QuicChromiumClientSession::OnNetworkConnected( ...@@ -2083,7 +2085,7 @@ void QuicChromiumClientSession::OnNetworkConnected(
return; return;
if (connection()->IsPathDegrading()) { if (connection()->IsPathDegrading()) {
current_migration_cause_ = CHANGE_NETWORK_ON_PATH_DEGRADING; current_migration_cause_ = NEW_NETWORK_CONNECTED_POST_PATH_DEGRADING;
} }
if (wait_for_new_network_) { if (wait_for_new_network_) {
......
...@@ -89,13 +89,14 @@ enum class ConnectionMigrationMode { ...@@ -89,13 +89,14 @@ enum class ConnectionMigrationMode {
// Cause of a migration. // Cause of a migration.
enum MigrationCause { enum MigrationCause {
UNKNOWN_CAUSE, UNKNOWN_CAUSE,
ON_NETWORK_CONNECTED, // No probing. ON_NETWORK_CONNECTED, // No probing.
ON_NETWORK_DISCONNECTED, // No probing. ON_NETWORK_DISCONNECTED, // No probing.
ON_WRITE_ERROR, // No probing. ON_WRITE_ERROR, // No probing.
ON_NETWORK_MADE_DEFAULT, // With probing. ON_NETWORK_MADE_DEFAULT, // With probing.
ON_MIGRATE_BACK_TO_DEFAULT_NETWORK, // With probing. ON_MIGRATE_BACK_TO_DEFAULT_NETWORK, // With probing.
CHANGE_NETWORK_ON_PATH_DEGRADING, // With probing. CHANGE_NETWORK_ON_PATH_DEGRADING, // With probing.
CHANGE_PORT_ON_PATH_DEGRADING, // With probing. CHANGE_PORT_ON_PATH_DEGRADING, // With probing.
NEW_NETWORK_CONNECTED_POST_PATH_DEGRADING, // With probing.
MIGRATION_CAUSE_MAX MIGRATION_CAUSE_MAX
}; };
......
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