OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic/quic_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/network_activity_monitor.h" |
16 #include "net/http/transport_security_state.h" | 17 #include "net/http/transport_security_state.h" |
17 #include "net/quic/crypto/proof_verifier_chromium.h" | 18 #include "net/quic/crypto/proof_verifier_chromium.h" |
18 #include "net/quic/crypto/quic_server_info.h" | 19 #include "net/quic/crypto/quic_server_info.h" |
19 #include "net/quic/quic_connection_helper.h" | 20 #include "net/quic/quic_connection_helper.h" |
20 #include "net/quic/quic_crypto_client_stream_factory.h" | 21 #include "net/quic/quic_crypto_client_stream_factory.h" |
21 #include "net/quic/quic_server_id.h" | 22 #include "net/quic/quic_server_id.h" |
22 #include "net/quic/quic_stream_factory.h" | 23 #include "net/quic/quic_stream_factory.h" |
23 #include "net/spdy/spdy_session.h" | 24 #include "net/spdy/spdy_session.h" |
24 #include "net/ssl/channel_id_service.h" | 25 #include "net/ssl/channel_id_service.h" |
25 #include "net/ssl/ssl_connection_status_flags.h" | 26 #include "net/ssl/ssl_connection_status_flags.h" |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 UMA_HISTOGRAM_BOOLEAN( | 627 UMA_HISTOGRAM_BOOLEAN( |
627 "Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets", | 628 "Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets", |
628 connection()->sent_packet_manager().HasUnackedPackets()); | 629 connection()->sent_packet_manager().HasUnackedPackets()); |
629 UMA_HISTOGRAM_COUNTS( | 630 UMA_HISTOGRAM_COUNTS( |
630 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveRTOCount", | 631 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveRTOCount", |
631 connection()->sent_packet_manager().consecutive_rto_count()); | 632 connection()->sent_packet_manager().consecutive_rto_count()); |
632 UMA_HISTOGRAM_COUNTS( | 633 UMA_HISTOGRAM_COUNTS( |
633 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveTLPCount", | 634 "Net.QuicSession.TimedOutWithOpenStreams.ConsecutiveTLPCount", |
634 connection()->sent_packet_manager().consecutive_tlp_count()); | 635 connection()->sent_packet_manager().consecutive_tlp_count()); |
635 } | 636 } |
| 637 if (connection()->sent_packet_manager().HasUnackedPackets()) { |
| 638 UMA_HISTOGRAM_TIMES( |
| 639 "Net.QuicSession.LocallyTimedOutWithOpenStreams." |
| 640 "TimeSinceLastReceived.UnackedPackets", |
| 641 NetworkActivityMonitor::GetInstance()->GetTimeSinceLastReceived()); |
| 642 } else { |
| 643 UMA_HISTOGRAM_TIMES( |
| 644 "Net.QuicSession.LocallyTimedOutWithOpenStreams." |
| 645 "TimeSinceLastReceived.NoUnackedPackets", |
| 646 NetworkActivityMonitor::GetInstance()->GetTimeSinceLastReceived()); |
| 647 } |
| 648 |
636 } else { | 649 } else { |
637 UMA_HISTOGRAM_COUNTS( | 650 UMA_HISTOGRAM_COUNTS( |
638 "Net.QuicSession.ConnectionClose.NumOpenStreams.HandshakeTimedOut", | 651 "Net.QuicSession.ConnectionClose.NumOpenStreams.HandshakeTimedOut", |
639 GetNumOpenStreams()); | 652 GetNumOpenStreams()); |
640 UMA_HISTOGRAM_COUNTS( | 653 UMA_HISTOGRAM_COUNTS( |
641 "Net.QuicSession.ConnectionClose.NumTotalStreams.HandshakeTimedOut", | 654 "Net.QuicSession.ConnectionClose.NumTotalStreams.HandshakeTimedOut", |
642 num_total_streams_); | 655 num_total_streams_); |
643 } | 656 } |
644 } | 657 } |
645 | 658 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 return; | 901 return; |
889 | 902 |
890 // TODO(rch): re-enable this code once beta is cut. | 903 // TODO(rch): re-enable this code once beta is cut. |
891 // if (stream_factory_) | 904 // if (stream_factory_) |
892 // stream_factory_->OnSessionConnectTimeout(this); | 905 // stream_factory_->OnSessionConnectTimeout(this); |
893 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 906 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
894 // DCHECK_EQ(0u, GetNumOpenStreams()); | 907 // DCHECK_EQ(0u, GetNumOpenStreams()); |
895 } | 908 } |
896 | 909 |
897 } // namespace net | 910 } // namespace net |
OLD | NEW |