Chromium Code Reviews| Index: net/http/http_stream_factory_impl.cc |
| diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc |
| index 0a742d1284204e4fcedf919df133dab72df2417f..271d4be508dd4f73f821e2ccd82c2eb014f6473d 100644 |
| --- a/net/http/http_stream_factory_impl.cc |
| +++ b/net/http/http_stream_factory_impl.cc |
| @@ -104,6 +104,28 @@ HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session, |
| HttpStreamFactoryImpl::~HttpStreamFactoryImpl() { |
| DCHECK(request_map_.empty()); |
| DCHECK(spdy_session_request_map_.empty()); |
| + size_t alt_job_count = 0; |
| + size_t main_job_count = 0; |
| + size_t preconnect_controller_count = 0; |
|
Alexei Svitkine (slow)
2017/03/20 15:51:58
Nit: Just use int since these are not compared wit
xunjieli
2017/03/20 16:37:35
Is this written somewhere?
According to https://ch
Alexei Svitkine (slow)
2017/03/20 16:56:04
The normal C++ style guide suggests to use int typ
Zhongyi Shi
2017/03/20 21:26:35
Done.
|
| + for (const auto& it : job_controller_set_) { |
| + DCHECK(it->HasPendingAltJob() || it->HasPendingMainJob()); |
| + // For a preconnect controller, it should have exactly the main job. |
| + if (it->is_preconnect()) { |
| + preconnect_controller_count++; |
| + continue; |
| + } |
| + // For non-preconnects. |
| + if (it->HasPendingAltJob()) |
| + alt_job_count++; |
| + if (it->HasPendingMainJob()) |
| + main_job_count++; |
| + } |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfPreconnect", |
| + preconnect_controller_count); |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfNonPreconnectAltJob", |
| + alt_job_count); |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfNonPreconnectMainJob", |
| + main_job_count); |
| } |
| HttpStreamRequest* HttpStreamFactoryImpl::RequestStream( |