| 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);
|
| +}
|
| +
|
| 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));
|
|
|