Remove unused net log type and add more net logs to help monitor the experiment of race stale dns on connection.
Change-Id: I7d68922489a73c902ed322206ea75715fb2f27b3 Reviewed-on: https://chromium-review.googlesource.com/c/1487889 Reviewed-by: Ryan Hamilton <rch@chromium.org> Commit-Queue: Ryan Hamilton <rch@chromium.org> Cr-Commit-Position: refs/heads/master@{#635366}
This commit is contained in:
@ -1680,12 +1680,18 @@ EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_CONNECT)
|
||||
// will be attempted soon.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_RETRY_ON_ALTERNATE_NETWORK)
|
||||
|
||||
// This event indicates that the stale host resolution has failed.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_FAILED)
|
||||
// This event indicates that the stale host result is used to try connecting.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_STALE_HOST_TRIED_ON_CONNECTION)
|
||||
|
||||
// This event indicates that stale host was not used to try connecting.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_STALE_HOST_NOT_USED_ON_CONNECTION)
|
||||
|
||||
// This event indicates that the stale host doesn't match with fresh host.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_NO_MATCH)
|
||||
|
||||
// This event indicates that stale host matches with fresh resolution.
|
||||
EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_MATCHED)
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// quic::QuicSession
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -152,14 +152,6 @@ void LogPlatformNotificationInHistogram(
|
||||
notification, NETWORK_NOTIFICATION_MAX);
|
||||
}
|
||||
|
||||
void LogStaleHostRacing(bool used) {
|
||||
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StaleHostRacing", used);
|
||||
}
|
||||
|
||||
void LogStaleAndFreshHostMatched(bool matched) {
|
||||
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StaleAndFreshHostMatched", matched);
|
||||
}
|
||||
|
||||
void LogConnectionIpPooling(bool pooled) {
|
||||
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ConnectionIpPooled", pooled);
|
||||
}
|
||||
@ -428,6 +420,32 @@ class QuicStreamFactory::Job {
|
||||
return false;
|
||||
}
|
||||
|
||||
void LogStaleHostRacing(bool used) {
|
||||
if (used) {
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::
|
||||
QUIC_STREAM_FACTORY_JOB_STALE_HOST_TRIED_ON_CONNECTION);
|
||||
} else {
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::
|
||||
QUIC_STREAM_FACTORY_JOB_STALE_HOST_NOT_USED_ON_CONNECTION);
|
||||
}
|
||||
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StaleHostRacing", used);
|
||||
}
|
||||
|
||||
void LogStaleAndFreshHostMatched(bool matched) {
|
||||
if (matched) {
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::
|
||||
QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_MATCHED);
|
||||
} else {
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::
|
||||
QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_NO_MATCH);
|
||||
}
|
||||
UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StaleAndFreshHostMatched", matched);
|
||||
}
|
||||
|
||||
IoState io_state_;
|
||||
QuicStreamFactory* factory_;
|
||||
quic::QuicTransportVersion quic_version_;
|
||||
@ -580,9 +598,6 @@ void QuicStreamFactory::Job::OnResolveHostComplete(int rv) {
|
||||
return;
|
||||
}
|
||||
LogStaleAndFreshHostMatched(false);
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::
|
||||
QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_NO_MATCH);
|
||||
CloseStaleHostConnection();
|
||||
resolve_host_request_ = std::move(fresh_resolve_host_request_);
|
||||
io_state_ = STATE_RESOLVE_HOST_COMPLETE;
|
||||
@ -774,8 +789,6 @@ int QuicStreamFactory::Job::DoValidateHost() {
|
||||
}
|
||||
|
||||
LogStaleAndFreshHostMatched(false);
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::QUIC_STREAM_FACTORY_JOB_STALE_HOST_RESOLUTION_NO_MATCH);
|
||||
resolve_host_request_ = std::move(fresh_resolve_host_request_);
|
||||
CloseStaleHostConnection();
|
||||
io_state_ = STATE_RESOLVE_HOST_COMPLETE;
|
||||
|
Reference in New Issue
Block a user