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

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

Issue 549433006: Fix the logic for computing the number of truncated QUIC ACK frames sent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 break; 364 break;
365 case STREAM_FRAME: 365 case STREAM_FRAME:
366 net_log_.AddEvent( 366 net_log_.AddEvent(
367 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT, 367 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT,
368 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame)); 368 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame));
369 break; 369 break;
370 case ACK_FRAME: 370 case ACK_FRAME:
371 net_log_.AddEvent( 371 net_log_.AddEvent(
372 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT, 372 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT,
373 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame)); 373 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame));
374 if (frame.ack_frame->is_truncated) 374 size_t num_ranges = 0;
375 QuicPacketSequenceNumber last_missing = 0;
376 for (size_t i = 0; i < frame.ack_frame->missing_packets.size(); ++i) {
377 if (frame.ack_frame->missing_packets[i] != last_missing + 1) {
Ian Swett 2014/09/08 17:27:58 It's annoying to have to perform this logic in mul
378 ++num_ranges;
379 }
380 last_missing = frame.ack_frame->missing_packets[i];
381 }
382 if (num_ranges >= numeric_limits<uint8>::max())
375 ++num_truncated_acks_sent_; 383 ++num_truncated_acks_sent_;
376 break; 384 break;
377 case CONGESTION_FEEDBACK_FRAME: 385 case CONGESTION_FEEDBACK_FRAME:
378 net_log_.AddEvent( 386 net_log_.AddEvent(
379 NetLog::TYPE_QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_SENT, 387 NetLog::TYPE_QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_SENT,
380 base::Bind(&NetLogQuicCongestionFeedbackFrameCallback, 388 base::Bind(&NetLogQuicCongestionFeedbackFrameCallback,
381 frame.congestion_feedback_frame)); 389 frame.congestion_feedback_frame));
382 break; 390 break;
383 case RST_STREAM_FRAME: 391 case RST_STREAM_FRAME:
384 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.RstStreamErrorCodeClient", 392 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.RstStreamErrorCodeClient",
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 continue; 860 continue;
853 } 861 }
854 // Record some overlapping patterns, to get a better picture, since this is 862 // Record some overlapping patterns, to get a better picture, since this is
855 // not very expensive. 863 // not very expensive.
856 if (i % 3 == 0) 864 if (i % 3 == 0)
857 six_packet_histogram->Add(recent_6_mask); 865 six_packet_histogram->Add(recent_6_mask);
858 } 866 }
859 } 867 }
860 868
861 } // namespace net 869 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698