diff options
author | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 04:07:05 +0000 |
---|---|---|
committer | rtenneti@google.com <rtenneti@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-14 04:07:05 +0000 |
commit | 46f88cd34cdc4c03acf9c0d1b67c862a0bda8470 (patch) | |
tree | 87a62bd29e6dc68f0add13b1296f1f96955f42fb /chrome/browser/net/network_stats.h | |
parent | b5bc3c5d199bb95adeaa01e98790d5da9fa338f0 (diff) | |
download | chromium_src-46f88cd34cdc4c03acf9c0d1b67c862a0bda8470.zip chromium_src-46f88cd34cdc4c03acf9c0d1b67c862a0bda8470.tar.gz chromium_src-46f88cd34cdc4c03acf9c0d1b67c862a0bda8470.tar.bz2 |
Network connectivity - clean up of 21 packets sending
code. Implemented all the comments suggested by jar
in http://codereview.chromium.org/10442127/.
R=jar
TEST=browser unit tests
Review URL: https://chromiumcodereview.appspot.com/10537110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/network_stats.h')
-rw-r--r-- | chrome/browser/net/network_stats.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/chrome/browser/net/network_stats.h b/chrome/browser/net/network_stats.h index 0a58d33..b90be40 100644 --- a/chrome/browser/net/network_stats.h +++ b/chrome/browser/net/network_stats.h @@ -165,6 +165,8 @@ class NetworkStats { // server and if connectivity failed, at what stage (Connect or Write or Read) // did it fail? // b) What is RTT for the echo message. + // c) Packet loss correlation and other network connectivity data by calling + // RecordAcksReceivedHistograms() and RecordStatusAndRTTHistograms(). void RecordHistograms(const ProtocolValue& protocol, const Status& status, int result); @@ -228,28 +230,24 @@ class NetworkStats { // if all the bytes are verified. NetworkStats::Status VerifyBytes(const std::string& response); - // Returns the histogram names for collecting network connectivity stats. - // This is called by RecordHistograms. It sets the histogram names in - // |rtt_histogram_name| and |status_histogram_name|. - // If |result| equals to net::OK, it returns - // "NetConnectivity.<protocol>.Success.<port>.<load_size>.RTT" as histogram - // name for RTT histogram, - // "NetConnectivity.<protocol>.Status.<port>.<load_size>" as histogram name - // for status histogram and - // "NetConnectivity.<protocol>.PacketLoss.<port>.<load_size>" as histogram - // name for packet loss histogram. - // |protocol| argument sets <protocol> in the histogram name. It would be - // either TCP or UDP. <port> is the string representation of |histogram_port|. - // |load_size| argument determines <load_size> in the histogram name. It would - // be either 100B or 1K. - static void GetHistogramNames(const ProtocolValue& protocol, - HistogramPortSelector histogram_port, - uint32 load_size, - int result, - std::string* rtt_histogram_name, - std::string* status_histogram_name, - std::string* packet_loss_histogram_name); + // Collect the following network connectivity stats when + // kMaximumSequentialPackets (21) packets are sent. + // a) Received the "echo response" for at least one packet. + // b) Received the "echo response" for the nth packet. + // c) Count the number of "echo responses" received for each of the initial + // sequences of packets 1...n. + void RecordAcksReceivedHistograms(); + // Collect the following network connectivity stats. + // a) What percentage of users can get a message end-to-end to a TCP/UDP + // server and if connectivity failed, at what stage (Connect or Write or Read) + // did it fail? + // b) What is RTT for the echo message. + // c) Records if there is a probabalistic dependency in packet loss when + // kMaximumCorrelationPackets packets are sent consecutively. + void RecordStatusAndRTTHistograms(const ProtocolValue& protocol, + const Status& status, + int result); // The socket handle for this session. scoped_ptr<net::Socket> socket_; |