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

Unified Diff: net/quic/quic_connection_logger.cc

Issue 669793003: QUIC - Added histogram to track how often chrome sends/receives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disk_cache_rtt_fix
Patch Set: fixed comments in Patch Set 1 Created 6 years, 2 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_logger.cc
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index b5ca18bae7ed7389234f6e4d6e9c9c5a1104698f..22d820ad2c02804041c67e2ca95fe4831144090f 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -29,11 +29,25 @@ namespace net {
namespace {
+// Histograms to track how often chrome sends/receives flow-control BLOCKED
+// frames. Note: these values must be kept in sync with the corresponding values
+// in: tools/metrics/histograms/histograms.xml
+enum BlockedFrameType {
+ BLOCKED_FRAME_RECEIVED = 0,
+ BLOCKED_FRAME_SENT = 1,
+ NUM_BLOCKED_FRAMES = 2,
+};
+
// We have ranges-of-buckets in the cumulative histogram (covering 21 packet
// sequences) of length 2, 3, 4, ... 22.
// Hence the largest sample is bounded by the sum of those numbers.
const int kBoundingSampleInCumulativeHistogram = ((2 + 22) * 21) / 2;
+void RecordBlockedFrame(BlockedFrameType blocked_frame_type) {
+ UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.FlowControlBlockedFrame",
+ blocked_frame_type, NUM_BLOCKED_FRAMES);
Ryan Hamilton 2014/10/21 19:48:14 Instead of recording entry each time we become blo
ramant (doing other things) 2014/10/21 22:05:31 Done.
+}
+
base::Value* NetLogQuicPacketCallback(const IPEndPoint* self_address,
const IPEndPoint* peer_address,
size_t packet_size,
@@ -442,6 +456,7 @@ void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) {
frame.window_update_frame));
break;
case BLOCKED_FRAME:
+ RecordBlockedFrame(BLOCKED_FRAME_SENT);
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_SENT,
base::Bind(&NetLogQuicBlockedFrameCallback,
@@ -636,6 +651,7 @@ void QuicConnectionLogger::OnWindowUpdateFrame(
}
void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) {
+ RecordBlockedFrame(BLOCKED_FRAME_RECEIVED);
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_RECEIVED,
base::Bind(&NetLogQuicBlockedFrameCallback, &frame));
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698