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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 if (stats.min_rtt_us > 0) { | 311 if (stats.min_rtt_us > 0) { |
312 reordering = static_cast<base::HistogramBase::Sample>( | 312 reordering = static_cast<base::HistogramBase::Sample>( |
313 100 * stats.max_time_reordering_us / stats.min_rtt_us); | 313 100 * stats.max_time_reordering_us / stats.min_rtt_us); |
314 } | 314 } |
315 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", | 315 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTime", |
316 reordering, 0, kMaxReordering, 50); | 316 reordering, 0, kMaxReordering, 50); |
317 if (stats.min_rtt_us > 100 * 1000) { | 317 if (stats.min_rtt_us > 100 * 1000) { |
318 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", | 318 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.MaxReorderingTimeLongRtt", |
319 reordering, 0, kMaxReordering, 50); | 319 reordering, 0, kMaxReordering, 50); |
320 } | 320 } |
321 UMA_HISTOGRAM_COUNTS("Net.QuicSession.MaxReordering", | 321 UMA_HISTOGRAM_COUNTS( |
322 stats.max_sequence_reordering); | 322 "Net.QuicSession.MaxReordering", |
| 323 static_cast<base::HistogramBase::Sample>(stats.max_sequence_reordering)); |
323 } | 324 } |
324 | 325 |
325 void QuicClientSession::OnStreamFrames( | 326 void QuicClientSession::OnStreamFrames( |
326 const std::vector<QuicStreamFrame>& frames) { | 327 const std::vector<QuicStreamFrame>& frames) { |
327 // Record total number of stream frames. | 328 // Record total number of stream frames. |
328 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); | 329 UMA_HISTOGRAM_COUNTS("Net.QuicNumStreamFramesInPacket", frames.size()); |
329 | 330 |
330 // Record number of frames per stream in packet. | 331 // Record number of frames per stream in packet. |
331 typedef std::map<QuicStreamId, size_t> FrameCounter; | 332 typedef std::map<QuicStreamId, size_t> FrameCounter; |
332 FrameCounter frames_per_stream; | 333 FrameCounter frames_per_stream; |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 return; | 934 return; |
934 | 935 |
935 // TODO(rch): re-enable this code once beta is cut. | 936 // TODO(rch): re-enable this code once beta is cut. |
936 // if (stream_factory_) | 937 // if (stream_factory_) |
937 // stream_factory_->OnSessionConnectTimeout(this); | 938 // stream_factory_->OnSessionConnectTimeout(this); |
938 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 939 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
939 // DCHECK_EQ(0u, GetNumOpenStreams()); | 940 // DCHECK_EQ(0u, GetNumOpenStreams()); |
940 } | 941 } |
941 | 942 |
942 } // namespace net | 943 } // namespace net |
OLD | NEW |