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

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

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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 | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_logger_unittest.cc » ('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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::Int64ToString(frame->delta_time_largest_observed.ToMicroseconds())); 121 base::Int64ToString(frame->delta_time_largest_observed.ToMicroseconds()));
122 dict->SetInteger("entropy_hash", 122 dict->SetInteger("entropy_hash",
123 frame->entropy_hash); 123 frame->entropy_hash);
124 dict->SetBoolean("truncated", frame->is_truncated); 124 dict->SetBoolean("truncated", frame->is_truncated);
125 125
126 base::ListValue* missing = new base::ListValue(); 126 base::ListValue* missing = new base::ListValue();
127 dict->Set("missing_packets", missing); 127 dict->Set("missing_packets", missing);
128 for (QuicPacketNumber packet : frame->missing_packets) 128 for (QuicPacketNumber packet : frame->missing_packets)
129 missing->AppendString(base::Uint64ToString(packet)); 129 missing->AppendString(base::Uint64ToString(packet));
130 130
131 base::ListValue* revived = new base::ListValue(); 131 dict->SetString("latest_revived_packet",
132 dict->Set("revived_packets", revived); 132 base::Int64ToString(frame->latest_revived_packet));
133 const PacketNumberSet& revived_packets = frame->revived_packets;
134 for (PacketNumberSet::const_iterator it = revived_packets.begin();
135 it != revived_packets.end(); ++it) {
136 revived->AppendString(base::Uint64ToString(*it));
137 }
138 133
139 base::ListValue* received = new base::ListValue(); 134 base::ListValue* received = new base::ListValue();
140 dict->Set("received_packet_times", received); 135 dict->Set("received_packet_times", received);
141 const PacketTimeVector& received_times = frame->received_packet_times; 136 const PacketTimeVector& received_times = frame->received_packet_times;
142 for (PacketTimeVector::const_iterator it = received_times.begin(); 137 for (PacketTimeVector::const_iterator it = received_times.begin();
143 it != received_times.end(); ++it) { 138 it != received_times.end(); ++it) {
144 base::DictionaryValue* info = new base::DictionaryValue(); 139 base::DictionaryValue* info = new base::DictionaryValue();
145 info->SetInteger("packet_number", static_cast<int>(it->first)); 140 info->SetInteger("packet_number", static_cast<int>(it->first));
146 info->SetString("received", 141 info->SetString("received",
147 base::Int64ToString(it->second.ToDebuggingValue())); 142 base::Int64ToString(it->second.ToDebuggingValue()));
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 continue; 891 continue;
897 } 892 }
898 // Record some overlapping patterns, to get a better picture, since this is 893 // Record some overlapping patterns, to get a better picture, since this is
899 // not very expensive. 894 // not very expensive.
900 if (i % 3 == 0) 895 if (i % 3 == 0)
901 six_packet_histogram->Add(recent_6_mask); 896 six_packet_histogram->Add(recent_6_mask);
902 } 897 }
903 } 898 }
904 899
905 } // namespace net 900 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_connection_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698