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

Unified Diff: net/url_request/url_request_context.cc

Issue 2897143003: Use NetworkTrafficAnnotation in URLRequestContext UMA logging (Closed)
Patch Set: self Created 3 years, 7 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 | « no previous file | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context.cc
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc
index da1330ea5bcc39c708ef21d64db05b41471fa870..52121e039ef4a6b157ebe72c138644e2e3c93638 100644
--- a/net/url_request/url_request_context.cc
+++ b/net/url_request/url_request_context.cc
@@ -5,6 +5,7 @@
#include "net/url_request/url_request_context.h"
#include <inttypes.h>
+#include <limits>
#include <utility>
#include "base/compiler_specific.h"
@@ -146,6 +147,10 @@ void URLRequestContext::InsertURLRequest(const URLRequest* request) const {
largest_outstanding_requests_count_seen_ = url_requests_.size();
UMA_HISTOGRAM_COUNTS_1M("Net.URLRequestContext.OutstandingRequests",
largest_outstanding_requests_count_seen_);
+ UMA_HISTOGRAM_ENUMERATION(
+ "Net.URLRequestContext.OutstandingRequests.Type",
+ request->traffic_annotation().unique_id_hash_code,
+ std::numeric_limits<base::HistogramBase::Sample>::max() - 1);
mmenke 2017/05/24 16:07:52 Erm...wait...is this right? SHould this be a spar
xunjieli 2017/05/24 16:18:16 I am not sure. I read the documentation on sparse
Alexei Svitkine (slow) 2017/05/24 17:13:29 Do the values go outside of the signed int32 range
xunjieli 2017/05/24 17:23:02 Thanks. + rhalavati@, can we switch to signed int
}
}
« no previous file with comments | « no previous file | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698