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

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

Issue 1672513002: Expose packet loss counts from QUIC to NetworkQualityEstimator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed rch comments Created 4 years, 9 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 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 5 #ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_
6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 6 #define NET_QUIC_QUIC_CONNECTION_LOGGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 static void AddTo21CumulativeHistogram(base::HistogramBase* histogram, 116 static void AddTo21CumulativeHistogram(base::HistogramBase* histogram,
117 int bit_mask_of_packets, 117 int bit_mask_of_packets,
118 int valid_bits_in_mask); 118 int valid_bits_in_mask);
119 // For connections longer than 21 received packets, this call will calculate 119 // For connections longer than 21 received packets, this call will calculate
120 // the overall packet loss rate, and record it into a histogram. 120 // the overall packet loss rate, and record it into a histogram.
121 void RecordAggregatePacketLossRate() const; 121 void RecordAggregatePacketLossRate() const;
122 // At destruction time, this records results of |pacaket_received_| into 122 // At destruction time, this records results of |pacaket_received_| into
123 // histograms for specific connection types. 123 // histograms for specific connection types.
124 void RecordLossHistograms() const; 124 void RecordLossHistograms() const;
125 125
126 // Reports the incremental packet counts to the |socket_performance_watcher_|.
127 void ReportIncrementalPacketCounts(
128 QuicPacketCount previous_largest_received_packet_number) const;
129
126 BoundNetLog net_log_; 130 BoundNetLog net_log_;
127 QuicSpdySession* session_; // Unowned. 131 QuicSpdySession* session_; // Unowned.
128 // The last packet number received. 132 // The last packet number received.
129 QuicPacketNumber last_received_packet_number_; 133 QuicPacketNumber last_received_packet_number_;
130 // The size of the most recently received packet. 134 // The size of the most recently received packet.
131 size_t last_received_packet_size_; 135 size_t last_received_packet_size_;
132 // The size of the previously received packet. 136 // The size of the previously received packet.
133 size_t previous_received_packet_size_; 137 size_t previous_received_packet_size_;
134 // The timestamp of last packet sent. 138 // The timestamp of last packet sent.
135 QuicTime last_packet_sent_time_; 139 QuicTime last_packet_sent_time_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Receives notifications regarding the performance of the underlying socket 191 // Receives notifications regarding the performance of the underlying socket
188 // for the QUIC connection. May be null. 192 // for the QUIC connection. May be null.
189 const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_; 193 const scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher_;
190 194
191 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger); 195 DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger);
192 }; 196 };
193 197
194 } // namespace net 198 } // namespace net
195 199
196 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_ 200 #endif // NET_QUIC_QUIC_CONNECTION_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698