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..06d223ad11e7aaa27a5d49c434c7995dc5c45143 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; |
| + for (const auto& it : job_controller_set_) { |
| + // For a preconnect controller, it should have exactly the main job. |
| + if (it->is_preconnect()) { |
| + preconnect_controller_count++; |
| + continue; |
| + } |
| + // For non-preconnects. |
|
xunjieli
2017/03/17 00:47:56
Suggest add a DCHECK(it->HasPendingAltJob()||it->H
Zhongyi Shi
2017/03/17 02:02:29
Done.
|
| + if (it->HasPendingAltJob()) |
| + alt_job_count++; |
| + if (it->HasPendingMainJob()) |
| + main_job_count++; |
| + } |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfJobController", |
|
xunjieli
2017/03/17 00:47:56
This histogram is not necessary, right?
We can ded
Zhongyi Shi
2017/03/17 02:02:29
Well, that's not exactly true. There might be JobC
xunjieli
2017/03/17 13:05:23
Right, that's why I suggested using a DCHECK(it->H
|
| + job_controller_set_.size()); |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfPreconnect", |
| + preconnect_controller_count); |
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfAltJob", alt_job_count); |
|
xunjieli
2017/03/17 00:47:56
For someone who might not know this code, I sugges
Zhongyi Shi
2017/03/17 02:02:29
Done.
|
| + UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfMainJob", |
| + main_job_count); |
| } |
| HttpStreamRequest* HttpStreamFactoryImpl::RequestStream( |