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

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: Count the number of BLOCKED frames recevied or sent. 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
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..541e29119ec621049e3a35742a6e23fc483b0709 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -339,6 +339,8 @@ QuicConnectionLogger::QuicConnectionLogger(QuicSession* session,
num_incorrect_connection_ids_(0),
num_undecryptable_packets_(0),
num_duplicate_packets_(0),
+ num_blocked_frames_received_(0),
+ num_blocked_frames_sent_(0),
connection_description_(GetConnectionDescriptionString()) {
}
@@ -355,6 +357,10 @@ QuicConnectionLogger::~QuicConnectionLogger() {
num_undecryptable_packets_);
UMA_HISTOGRAM_COUNTS("Net.QuicSession.DuplicatePacketsReceived",
num_duplicate_packets_);
+ UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFramesReceived",
+ num_blocked_frames_received_);
+ UMA_HISTOGRAM_COUNTS("Net.QuicSession.BlockedFramesSent",
+ num_blocked_frames_sent_);
if (num_frames_received_ > 0) {
int duplicate_stream_frame_per_thousand =
@@ -442,6 +448,7 @@ void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) {
frame.window_update_frame));
break;
case BLOCKED_FRAME:
+ ++num_blocked_frames_sent_;
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_SENT,
base::Bind(&NetLogQuicBlockedFrameCallback,
@@ -636,6 +643,7 @@ void QuicConnectionLogger::OnWindowUpdateFrame(
}
void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) {
+ ++num_blocked_frames_received_;
net_log_.AddEvent(
NetLog::TYPE_QUIC_SESSION_BLOCKED_FRAME_RECEIVED,
base::Bind(&NetLogQuicBlockedFrameCallback, &frame));

Powered by Google App Engine
This is Rietveld 408576698