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" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } | 236 } |
237 } else { | 237 } else { |
238 if (port_selected) { | 238 if (port_selected) { |
239 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS", | 239 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS", |
240 round_trip_handshakes, 0, 3, 4); | 240 round_trip_handshakes, 0, 3, 4); |
241 } else { | 241 } else { |
242 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", | 242 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", |
243 round_trip_handshakes, 0, 3, 4); | 243 round_trip_handshakes, 0, 3, 4); |
244 } | 244 } |
245 } | 245 } |
| 246 const QuicConnectionStats stats = connection()->GetStats(); |
| 247 uint64 reordering = |
| 248 GG_UINT64_C(100) * stats.max_time_reordering_us / stats.min_rtt_us; |
| 249 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", |
| 250 reordering, 0, 100, 101); |
| 251 if (stats.min_rtt_us > 100) { |
| 252 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", |
| 253 reordering, 0, 100, 101); |
| 254 } |
246 } | 255 } |
247 | 256 |
248 void QuicClientSession::OnStreamFrames( | 257 void QuicClientSession::OnStreamFrames( |
249 const std::vector<QuicStreamFrame>& frames) { | 258 const std::vector<QuicStreamFrame>& frames) { |
250 // Record total number of stream frames. | 259 // Record total number of stream frames. |
251 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); | 260 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); |
252 | 261 |
253 // Record number of frames per stream in packet. | 262 // Record number of frames per stream in packet. |
254 typedef std::map<QuicStreamId, size_t> FrameCounter; | 263 typedef std::map<QuicStreamId, size_t> FrameCounter; |
255 FrameCounter frames_per_stream; | 264 FrameCounter frames_per_stream; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); | 786 RecordUnexpectedNotGoingAway(NOTIFY_FACTORY_OF_SESSION_CLOSED); |
778 | 787 |
779 going_away_ = true; | 788 going_away_ = true; |
780 DCHECK_EQ(0u, GetNumOpenStreams()); | 789 DCHECK_EQ(0u, GetNumOpenStreams()); |
781 // Will delete |this|. | 790 // Will delete |this|. |
782 if (stream_factory_) | 791 if (stream_factory_) |
783 stream_factory_->OnSessionClosed(this); | 792 stream_factory_->OnSessionClosed(this); |
784 } | 793 } |
785 | 794 |
786 } // namespace net | 795 } // namespace net |
OLD | NEW |