OLD | NEW |
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 Loading... |
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( |
132 dict->Set("revived_packets", revived); | 132 "latest_revived_packet", |
133 const PacketNumberSet& revived_packets = frame->revived_packets; | 133 base::Int64ToString(frame->latest_revived_packet)); |
134 for (PacketNumberSet::const_iterator it = revived_packets.begin(); | |
135 it != revived_packets.end(); ++it) { | |
136 revived->AppendString(base::Uint64ToString(*it)); | |
137 } | |
138 | 134 |
139 base::ListValue* received = new base::ListValue(); | 135 base::ListValue* received = new base::ListValue(); |
140 dict->Set("received_packet_times", received); | 136 dict->Set("received_packet_times", received); |
141 const PacketTimeVector& received_times = frame->received_packet_times; | 137 const PacketTimeVector& received_times = frame->received_packet_times; |
142 for (PacketTimeVector::const_iterator it = received_times.begin(); | 138 for (PacketTimeVector::const_iterator it = received_times.begin(); |
143 it != received_times.end(); ++it) { | 139 it != received_times.end(); ++it) { |
144 base::DictionaryValue* info = new base::DictionaryValue(); | 140 base::DictionaryValue* info = new base::DictionaryValue(); |
145 info->SetInteger("packet_number", static_cast<int>(it->first)); | 141 info->SetInteger("packet_number", static_cast<int>(it->first)); |
146 info->SetString("received", | 142 info->SetString("received", |
147 base::Int64ToString(it->second.ToDebuggingValue())); | 143 base::Int64ToString(it->second.ToDebuggingValue())); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 continue; | 892 continue; |
897 } | 893 } |
898 // Record some overlapping patterns, to get a better picture, since this is | 894 // Record some overlapping patterns, to get a better picture, since this is |
899 // not very expensive. | 895 // not very expensive. |
900 if (i % 3 == 0) | 896 if (i % 3 == 0) |
901 six_packet_histogram->Add(recent_6_mask); | 897 six_packet_histogram->Add(recent_6_mask); |
902 } | 898 } |
903 } | 899 } |
904 | 900 |
905 } // namespace net | 901 } // namespace net |
OLD | NEW |