Index: net/spdy/spdy_session.cc |
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc |
index 67fe9f45a45c6f6c74b2ce05128f5a2be778040b..7a1cd5fad1ae114e9607a417b1cdf1aba3c8b470 100644 |
--- a/net/spdy/spdy_session.cc |
+++ b/net/spdy/spdy_session.cc |
@@ -644,6 +644,8 @@ SpdySession::SpdySession(const SpdySessionKey& spdy_session_key, |
unclaimed_pushed_streams_(this), |
num_pushed_streams_(0u), |
num_active_pushed_streams_(0u), |
+ bytes_pushed_count_(0u), |
+ bytes_pushed_and_unclaimed_count_(0u), |
in_flight_write_frame_type_(DATA), |
in_flight_write_frame_size_(0), |
is_secure_(false), |
@@ -1179,6 +1181,7 @@ void SpdySession::CloseActiveStreamIterator(ActiveStreamMap::iterator it, |
// http://crbug.com/261712 .) |
if (owned_stream->type() == SPDY_PUSH_STREAM) { |
unclaimed_pushed_streams_.erase(owned_stream->url()); |
+ bytes_pushed_count_ += owned_stream->recv_bytes(); |
num_pushed_streams_--; |
if (!owned_stream->IsReservedRemote()) |
num_active_pushed_streams_--; |
@@ -2181,6 +2184,7 @@ void SpdySession::DeleteExpiredPushedStreams() { |
ActiveStreamMap::iterator active_it = active_streams_.find(*to_close_it); |
if (active_it == active_streams_.end()) |
continue; |
+ bytes_pushed_and_unclaimed_count_ += active_it->second.stream->recv_bytes(); |
LogAbandonedActiveStream(active_it, ERR_INVALID_SPDY_STREAM); |
// CloseActiveStreamIterator() will remove the stream from |
@@ -2864,6 +2868,10 @@ void SpdySession::RecordHistograms() { |
streams_pushed_and_claimed_count_, 1, 300, 50); |
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdyStreamsAbandonedPerSession", |
streams_abandoned_count_, 1, 300, 50); |
+ UMA_HISTOGRAM_COUNTS_1M("Net.SpdySession.PushedBytes", bytes_pushed_count_); |
+ DCHECK_LE(bytes_pushed_and_unclaimed_count_, bytes_pushed_count_); |
+ UMA_HISTOGRAM_COUNTS_1M("Net.SpdySession.PushedAndUnclaimedBytes", |
+ bytes_pushed_and_unclaimed_count_); |
UMA_HISTOGRAM_ENUMERATION("Net.SpdySettingsSent", |
sent_settings_ ? 1 : 0, 2); |
UMA_HISTOGRAM_ENUMERATION("Net.SpdySettingsReceived", |