Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1177)

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 2815153002: Only log the job controller count when it's hitting boundaries for the first time (Closed)
Patch Set: address nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cdb31094ad1e19bc635841c18423a931397f00f4..9c38e69f1c9d565b246f8cda6c6087eef0541d51 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -103,7 +103,8 @@ HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session,
bool for_websockets)
: session_(session),
job_factory_(new DefaultJobFactory()),
- for_websockets_(for_websockets) {}
+ for_websockets_(for_websockets),
+ last_logged_job_controller_count_(0) {}
HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
DCHECK(spdy_session_request_map_.empty());
@@ -356,11 +357,15 @@ bool HttpStreamFactoryImpl::ProxyServerSupportsPriorities(
scheme_host_port);
}
-void HttpStreamFactoryImpl::AddJobControllerCountToHistograms() const {
+void HttpStreamFactoryImpl::AddJobControllerCountToHistograms() {
// Only log the count of JobControllers when the count is hitting one of the
- // boundaries which is a multiple of 100: 100, 200, 300, etc.
- if (job_controller_set_.size() < 100 || job_controller_set_.size() % 100 != 0)
+ // boundaries for the first time which is a multiple of 100: 100, 200, 300,
+ // etc.
+ if (job_controller_set_.size() % 100 != 0 ||
+ job_controller_set_.size() <= last_logged_job_controller_count_) {
return;
+ }
+ last_logged_job_controller_count_ = job_controller_set_.size();
UMA_HISTOGRAM_COUNTS_1M("Net.JobControllerSet.CountOfJobController",
job_controller_set_.size());
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698