Chromium Code Reviews| Index: content/browser/loader/resource_dispatcher_host_impl.cc |
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
| index a9c9157800379d6417aed7d77b1a522fe829b111..cdaadd1d734d2412e648046a1552d15df34354c2 100644 |
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc |
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
| @@ -137,7 +137,7 @@ static ResourceDispatcherHostImpl* g_resource_dispatcher_host; |
| const int kUpdateLoadStatesIntervalMsec = 250; |
| // Maximum byte "cost" of all the outstanding requests for a renderer. |
| -// See delcaration of |max_outstanding_requests_cost_per_process_| for details. |
| +// See declaration of |max_outstanding_requests_cost_per_process_| for details. |
| // This bound is 25MB, which allows for around 6000 outstanding requests. |
| const int kMaxOutstandingRequestsCostPerProcess = 26214400; |
| @@ -350,6 +350,8 @@ ResourceDispatcherHostImpl::ResourceDispatcherHostImpl( |
| max_num_in_flight_requests_ * kMaxRequestsPerProcessRatio)), |
| max_outstanding_requests_cost_per_process_( |
| kMaxOutstandingRequestsCostPerProcess), |
| + largest_outstanding_request_count_seen_(0), |
| + largest_outstanding_request_per_process_count_seen_(0), |
| delegate_(nullptr), |
| loader_delegate_(nullptr), |
| allow_cross_origin_auth_prompt_(false), |
| @@ -1904,6 +1906,20 @@ ResourceDispatcherHostImpl::IncrementOutstandingRequestsCount( |
| DCHECK_GE(stats.num_requests, 0); |
| UpdateOutstandingRequestsStats(*info, stats); |
| + if (num_in_flight_requests_ > largest_outstanding_request_count_seen_) { |
|
Charlie Harrison
2017/04/19 23:08:28
I wonder if this would be better logged in Shutdow
xunjieli
2017/04/20 13:34:11
Similar to crbug.com/704988, Chrome on Android nev
Charlie Harrison
2017/04/20 13:39:16
OK, this LGTM but it would be preferable to hook i
xunjieli
2017/04/20 20:06:08
Acknowledged. I didn't find a way to hook it up wi
Charlie Harrison
2017/04/20 20:09:14
One possible way to implement it would be to pull
xunjieli
2017/04/20 20:14:15
Acknowledged. Thanks.
|
| + largest_outstanding_request_count_seen_ = num_in_flight_requests_; |
| + UMA_HISTOGRAM_COUNTS_1M( |
| + "Net.ResourceDispatcherHost.OutstandingRequests.Total", |
| + largest_outstanding_request_count_seen_); |
| + } |
| + |
| + if (stats.num_requests > largest_outstanding_request_count_seen_) { |
| + largest_outstanding_request_per_process_count_seen_ = stats.num_requests; |
| + UMA_HISTOGRAM_COUNTS_1M( |
| + "Net.ResourceDispatcherHost.OutstandingRequests.PerProcess", |
| + largest_outstanding_request_per_process_count_seen_); |
| + } |
| + |
| return stats; |
| } |