Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: net/quic/quic_connection_logger.cc

Issue 23451015: Add a new histogram: Net.QuicSession.OutOfOrderGapReceived (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_connection_logger.h" 5 #include "net/quic/quic_connection_logger.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (delta > 1) { 294 if (delta > 1) {
295 // There is a gap between the largest packet previously received and 295 // There is a gap between the largest packet previously received and
296 // the current packet. This indicates either loss, or out-of-order 296 // the current packet. This indicates either loss, or out-of-order
297 // delivery. 297 // delivery.
298 UMA_HISTOGRAM_COUNTS("Net.QuicSession.PacketGapReceived", delta - 1); 298 UMA_HISTOGRAM_COUNTS("Net.QuicSession.PacketGapReceived", delta - 1);
299 } 299 }
300 largest_received_packet_sequence_number_ = header.packet_sequence_number; 300 largest_received_packet_sequence_number_ = header.packet_sequence_number;
301 } 301 }
302 if (header.packet_sequence_number < last_received_packet_sequence_number_) { 302 if (header.packet_sequence_number < last_received_packet_sequence_number_) {
303 ++out_of_order_recieved_packet_count_; 303 ++out_of_order_recieved_packet_count_;
304 UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderGapReceived",
305 last_received_packet_sequence_number_ -
306 header.packet_sequence_number);
304 } 307 }
305 last_received_packet_sequence_number_ = header.packet_sequence_number; 308 last_received_packet_sequence_number_ = header.packet_sequence_number;
306 } 309 }
307 310
308 void QuicConnectionLogger::OnStreamFrame(const QuicStreamFrame& frame) { 311 void QuicConnectionLogger::OnStreamFrame(const QuicStreamFrame& frame) {
309 net_log_.AddEvent( 312 net_log_.AddEvent(
310 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_RECEIVED, 313 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_RECEIVED,
311 base::Bind(&NetLogQuicStreamFrameCallback, &frame)); 314 base::Bind(&NetLogQuicStreamFrameCallback, &frame));
312 } 315 }
313 316
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 410 }
408 411
409 void QuicConnectionLogger::OnConnectionClose(QuicErrorCode error, 412 void QuicConnectionLogger::OnConnectionClose(QuicErrorCode error,
410 bool from_peer) { 413 bool from_peer) {
411 net_log_.AddEvent( 414 net_log_.AddEvent(
412 NetLog::TYPE_QUIC_SESSION_CLOSED, 415 NetLog::TYPE_QUIC_SESSION_CLOSED,
413 base::Bind(&NetLogQuicConnectionClosedCallback, error, from_peer)); 416 base::Bind(&NetLogQuicConnectionClosedCallback, error, from_peer));
414 } 417 }
415 418
416 } // namespace net 419 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698