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

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

Issue 2217483003: Remove untracked histograms: Net.QuicSession.TruncatedAcksReceived/TruncatedAcksSent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fully remove the truncated acks counting Created 4 years, 4 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
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/chromium/quic_connection_logger.h" 5 #include "net/quic/chromium/quic_connection_logger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 session_(session), 293 session_(session),
294 last_received_packet_number_(0), 294 last_received_packet_number_(0),
295 last_received_packet_size_(0), 295 last_received_packet_size_(0),
296 previous_received_packet_size_(0), 296 previous_received_packet_size_(0),
297 last_packet_sent_time_(base::TimeTicks()), 297 last_packet_sent_time_(base::TimeTicks()),
298 largest_received_packet_number_(0), 298 largest_received_packet_number_(0),
299 largest_received_missing_packet_number_(0), 299 largest_received_missing_packet_number_(0),
300 num_out_of_order_received_packets_(0), 300 num_out_of_order_received_packets_(0),
301 num_out_of_order_large_received_packets_(0), 301 num_out_of_order_large_received_packets_(0),
302 num_packets_received_(0), 302 num_packets_received_(0),
303 num_truncated_acks_sent_(0),
304 num_truncated_acks_received_(0),
305 num_frames_received_(0), 303 num_frames_received_(0),
306 num_duplicate_frames_received_(0), 304 num_duplicate_frames_received_(0),
307 num_incorrect_connection_ids_(0), 305 num_incorrect_connection_ids_(0),
308 num_undecryptable_packets_(0), 306 num_undecryptable_packets_(0),
309 num_duplicate_packets_(0), 307 num_duplicate_packets_(0),
310 num_blocked_frames_received_(0), 308 num_blocked_frames_received_(0),
311 num_blocked_frames_sent_(0), 309 num_blocked_frames_sent_(0),
312 connection_description_(connection_description), 310 connection_description_(connection_description),
313 socket_performance_watcher_(std::move(socket_performance_watcher)) {} 311 socket_performance_watcher_(std::move(socket_performance_watcher)) {}
314 312
315 QuicConnectionLogger::~QuicConnectionLogger() { 313 QuicConnectionLogger::~QuicConnectionLogger() {
316 UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderPacketsReceived", 314 UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderPacketsReceived",
317 num_out_of_order_received_packets_); 315 num_out_of_order_received_packets_);
318 UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderLargePacketsReceived", 316 UMA_HISTOGRAM_COUNTS("Net.QuicSession.OutOfOrderLargePacketsReceived",
319 num_out_of_order_large_received_packets_); 317 num_out_of_order_large_received_packets_);
320 UMA_HISTOGRAM_COUNTS("Net.QuicSession.TruncatedAcksSent",
321 num_truncated_acks_sent_);
322 UMA_HISTOGRAM_COUNTS("Net.QuicSession.TruncatedAcksReceived",
323 num_truncated_acks_received_);
324 UMA_HISTOGRAM_COUNTS("Net.QuicSession.IncorrectConnectionIDsReceived", 318 UMA_HISTOGRAM_COUNTS("Net.QuicSession.IncorrectConnectionIDsReceived",
325 num_incorrect_connection_ids_); 319 num_incorrect_connection_ids_);
326 UMA_HISTOGRAM_COUNTS("Net.QuicSession.UndecryptablePacketsReceived", 320 UMA_HISTOGRAM_COUNTS("Net.QuicSession.UndecryptablePacketsReceived",
327 num_undecryptable_packets_); 321 num_undecryptable_packets_);
328 UMA_HISTOGRAM_COUNTS("Net.QuicSession.DuplicatePacketsReceived", 322 UMA_HISTOGRAM_COUNTS("Net.QuicSession.DuplicatePacketsReceived",
329 num_duplicate_packets_); 323 num_duplicate_packets_);
330 UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFrames.Received", 324 UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFrames.Received",
331 num_blocked_frames_received_); 325 num_blocked_frames_received_);
332 UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFrames.Sent", 326 UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFrames.Sent",
333 num_blocked_frames_sent_); 327 num_blocked_frames_sent_);
(...skipping 23 matching lines...) Expand all
357 break; 351 break;
358 case STREAM_FRAME: 352 case STREAM_FRAME:
359 net_log_.AddEvent( 353 net_log_.AddEvent(
360 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT, 354 NetLog::TYPE_QUIC_SESSION_STREAM_FRAME_SENT,
361 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame)); 355 base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame));
362 break; 356 break;
363 case ACK_FRAME: { 357 case ACK_FRAME: {
364 net_log_.AddEvent( 358 net_log_.AddEvent(
365 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT, 359 NetLog::TYPE_QUIC_SESSION_ACK_FRAME_SENT,
366 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame)); 360 base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame));
367 // Missing packets histogram only relevant for v33 and lower
368 // TODO(rch, rtenneti) sort out histograms for v34+
369 if (session_->connection()->version() > QUIC_VERSION_33) {
370 break;
371 }
372 const PacketNumberQueue& missing_packets = frame.ack_frame->packets;
373 const uint8_t max_ranges = std::numeric_limits<uint8_t>::max();
374 // Compute an upper bound on the number of NACK ranges. If the bound
375 // is below the max, then it clearly isn't truncated.
376 if (missing_packets.NumPacketsSlow() < max_ranges ||
377 (missing_packets.Max() - missing_packets.Min() -
378 missing_packets.NumPacketsSlow() + 1) < max_ranges) {
379 break;
380 }
381 size_t num_ranges = 0;
382 QuicPacketNumber last_missing = 0;
383 for (QuicPacketNumber packet : missing_packets) {
384 if (packet != last_missing + 1 && ++num_ranges >= max_ranges) {
385 ++num_truncated_acks_sent_;
386 break;
387 }
388 last_missing = packet;
389 }
390 break; 361 break;
391 } 362 }
392 case RST_STREAM_FRAME: 363 case RST_STREAM_FRAME:
393 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.RstStreamErrorCodeClient", 364 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.RstStreamErrorCodeClient",
394 frame.rst_stream_frame->error_code); 365 frame.rst_stream_frame->error_code);
395 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_RST_STREAM_FRAME_SENT, 366 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_RST_STREAM_FRAME_SENT,
396 base::Bind(&NetLogQuicRstStreamFrameCallback, 367 base::Bind(&NetLogQuicRstStreamFrameCallback,
397 frame.rst_stream_frame)); 368 frame.rst_stream_frame));
398 break; 369 break;
399 case CONNECTION_CLOSE_FRAME: 370 case CONNECTION_CLOSE_FRAME:
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 void QuicConnectionLogger::OnAckFrame(const QuicAckFrame& frame) { 522 void QuicConnectionLogger::OnAckFrame(const QuicAckFrame& frame) {
552 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_ACK_FRAME_RECEIVED, 523 net_log_.AddEvent(NetLog::TYPE_QUIC_SESSION_ACK_FRAME_RECEIVED,
553 base::Bind(&NetLogQuicAckFrameCallback, &frame)); 524 base::Bind(&NetLogQuicAckFrameCallback, &frame));
554 525
555 const size_t kApproximateLargestSoloAckBytes = 100; 526 const size_t kApproximateLargestSoloAckBytes = 100;
556 if (last_received_packet_number_ < received_acks_.size() && 527 if (last_received_packet_number_ < received_acks_.size() &&
557 last_received_packet_size_ < kApproximateLargestSoloAckBytes) { 528 last_received_packet_size_ < kApproximateLargestSoloAckBytes) {
558 received_acks_[static_cast<size_t>(last_received_packet_number_)] = true; 529 received_acks_[static_cast<size_t>(last_received_packet_number_)] = true;
559 } 530 }
560 531
561 if (frame.is_truncated)
562 ++num_truncated_acks_received_;
563
564 if (frame.packets.Empty()) 532 if (frame.packets.Empty())
565 return; 533 return;
566 534
567 // TODO(rch, rtenneti) sort out histograms for QUIC_VERSION_34 and above. 535 // TODO(rch, rtenneti) sort out histograms for QUIC_VERSION_34 and above.
568 if (session_->connection()->version() > QUIC_VERSION_33) { 536 if (session_->connection()->version() > QUIC_VERSION_33) {
569 return; 537 return;
570 } 538 }
571 const PacketNumberQueue& missing_packets = frame.packets; 539 const PacketNumberQueue& missing_packets = frame.packets;
572 PacketNumberQueue::const_iterator it = 540 PacketNumberQueue::const_iterator it =
573 missing_packets.lower_bound(largest_received_missing_packet_number_); 541 missing_packets.lower_bound(largest_received_missing_packet_number_);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 continue; 855 continue;
888 } 856 }
889 // Record some overlapping patterns, to get a better picture, since this is 857 // Record some overlapping patterns, to get a better picture, since this is
890 // not very expensive. 858 // not very expensive.
891 if (i % 3 == 0) 859 if (i % 3 == 0)
892 six_packet_histogram->Add(recent_6_mask); 860 six_packet_histogram->Add(recent_6_mask);
893 } 861 }
894 } 862 }
895 863
896 } // namespace net 864 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_connection_logger.h ('k') | net/quic/chromium/quic_connection_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698