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

Unified Diff: content/browser/loader/detachable_resource_handler.cc

Issue 2820303002: Add a UMA histogram for measuring DetachableResourceHandler duration (Closed)
Patch Set: 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/detachable_resource_handler.cc
diff --git a/content/browser/loader/detachable_resource_handler.cc b/content/browser/loader/detachable_resource_handler.cc
index aa1f7bd608369121b38a115e85e91d442973b088..63e22d584afb6753747d8736992bb2e26c15e9fd 100644
--- a/content/browser/loader/detachable_resource_handler.cc
+++ b/content/browser/loader/detachable_resource_handler.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "content/browser/loader/null_resource_controller.h"
#include "content/browser/loader/resource_controller.h"
@@ -240,6 +241,10 @@ void DetachableResourceHandler::OnReadCompleted(
void DetachableResourceHandler::OnResponseCompleted(
const net::URLRequestStatus& status,
std::unique_ptr<ResourceController> controller) {
+ UMA_HISTOGRAM_MEDIUM_TIMES(
+ "Net.DetachableResourceHandler.Duration",
+ base::TimeTicks::Now() - request()->creation_time());
+
// No DCHECK(!is_deferred_) as the request may have been cancelled while
// deferred.
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698