OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/field_trial.h" | 9 #include "base/field_trial.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 | 1026 |
1027 base::TimeDelta host_resolution_and_tcp_connection_latency = | 1027 base::TimeDelta host_resolution_and_tcp_connection_latency = |
1028 base::Time::Now() - host_resolution_start_time_; | 1028 base::Time::Now() - host_resolution_start_time_; |
1029 | 1029 |
1030 UMA_HISTOGRAM_CLIPPED_TIMES( | 1030 UMA_HISTOGRAM_CLIPPED_TIMES( |
1031 FieldTrial::MakeName( | 1031 FieldTrial::MakeName( |
1032 "Net.Dns_Resolution_And_TCP_Connection_Latency", "DnsImpact").data(), | 1032 "Net.Dns_Resolution_And_TCP_Connection_Latency", "DnsImpact").data(), |
1033 host_resolution_and_tcp_connection_latency, | 1033 host_resolution_and_tcp_connection_latency, |
1034 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), | 1034 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), |
1035 100); | 1035 100); |
| 1036 |
| 1037 UMA_HISTOGRAM_COUNTS_100( |
| 1038 FieldTrial::MakeName( |
| 1039 "Net.TCP_Connection_Idle_Sockets", "DnsImpact").data(), |
| 1040 session_->connection_pool()->IdleSocketCountInGroup( |
| 1041 connection_.group_name())); |
1036 } | 1042 } |
1037 | 1043 |
1038 void HttpNetworkTransaction::LogTransactionConnectedMetrics() const { | 1044 void HttpNetworkTransaction::LogTransactionConnectedMetrics() const { |
1039 base::TimeDelta total_duration = response_.response_time - start_time_; | 1045 base::TimeDelta total_duration = response_.response_time - start_time_; |
1040 | 1046 |
1041 UMA_HISTOGRAM_CLIPPED_TIMES( | 1047 UMA_HISTOGRAM_CLIPPED_TIMES( |
1042 FieldTrial::MakeName( | 1048 FieldTrial::MakeName( |
1043 "Net.Transaction_Connected_Under_10", | 1049 "Net.Transaction_Connected_Under_10", |
1044 "DnsImpact").data(), | 1050 "DnsImpact").data(), |
1045 total_duration, | 1051 total_duration, |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 if (target == HttpAuth::AUTH_PROXY) { | 1676 if (target == HttpAuth::AUTH_PROXY) { |
1671 auth_info->host = ASCIIToWide(proxy_info_.proxy_server().host_and_port()); | 1677 auth_info->host = ASCIIToWide(proxy_info_.proxy_server().host_and_port()); |
1672 } else { | 1678 } else { |
1673 DCHECK(target == HttpAuth::AUTH_SERVER); | 1679 DCHECK(target == HttpAuth::AUTH_SERVER); |
1674 auth_info->host = ASCIIToWide(request_->url.host()); | 1680 auth_info->host = ASCIIToWide(request_->url.host()); |
1675 } | 1681 } |
1676 response_.auth_challenge = auth_info; | 1682 response_.auth_challenge = auth_info; |
1677 } | 1683 } |
1678 | 1684 |
1679 } // namespace net | 1685 } // namespace net |
OLD | NEW |