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

Unified Diff: net/quic/quic_connection_logger.h

Issue 180833004: Gather histogram for received packets indicating losses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix arm build; using size_t rather than uint64 for const static initialized in header Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/quic_connection_logger.cc » ('j') | net/quic/quic_connection_logger.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_logger.h
diff --git a/net/quic/quic_connection_logger.h b/net/quic/quic_connection_logger.h
index ed9577ac361761ec0b98805f6e5f7eead0de5da7..955056862741bb74c8c1ac504171e85008f2c2c1 100644
--- a/net/quic/quic_connection_logger.h
+++ b/net/quic/quic_connection_logger.h
@@ -5,7 +5,10 @@
#ifndef NET_QUIC_QUIC_CONNECTION_LOGGER_H_
#define NET_QUIC_QUIC_CONNECTION_LOGGER_H_
+#include <bitset>
+
#include "net/base/ip_endpoint.h"
+#include "net/base/network_change_notifier.h"
#include "net/quic/quic_connection.h"
#include "net/quic/quic_protocol.h"
@@ -60,6 +63,16 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
void OnSuccessfulVersionNegotiation(const QuicVersion& version);
private:
+ // Do a factory get for an "Ack_" or "Nack_" style histogram for recording
+ // packet loss stats.
+ base::HistogramBase* GetAckHistogram(const char* ack_or_nack);
+ // At destruction time, this records results of |pacaket_received_| into
+ // histograms for specific connection types.
+ void RecordAckNackHistograms();
+
+ // The number of packets for which status is recorded.
+ static const size_t kMaxPacketStatus = 100;
+
BoundNetLog net_log_;
// The last packet sequence number received.
QuicPacketSequenceNumber last_received_packet_sequence_number_;
@@ -78,6 +91,13 @@ class NET_EXPORT_PRIVATE QuicConnectionLogger
size_t num_truncated_acks_received_;
// The kCADR value provided by the server in ServerHello.
IPEndPoint client_address_;
+ // Vector of inital packets status' indexed by packet sequence numbers, where
+ // false means never received. Zero is not a valid packet sequence number, so
+ // that offset is never really used.
Ryan Hamilton 2014/03/07 17:47:05 nit: s/really//
jar (doing other things) 2014/03/07 18:01:11 Done.
+ std::bitset<kMaxPacketStatus + 1> packets_received_;
+ // The available type of connection (WiFi, 3G, etc.) when connection was first
+ // used.
+ NetworkChangeNotifier::ConnectionType connection_type_;
DISALLOW_COPY_AND_ASSIGN(QuicConnectionLogger);
};
« no previous file with comments | « no previous file | net/quic/quic_connection_logger.cc » ('j') | net/quic/quic_connection_logger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698