Commit aa65eace authored by Charles Harrison's avatar Charles Harrison Committed by Commit Bot

Add metric to capture the time between request initiation and start

This CL adds a metric to measure the time spent from URLRequest creation
and when Start() is called on it. The purpose is to measure time spent
in various resource handlers before sending the request out to the net
stack.

Bug: 779914
Change-Id: I8e462a7d9fb541de38589aeb926f81047a735d50
Reviewed-on: https://chromium-review.googlesource.com/771549
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517131}
parent db8d9179
...@@ -586,6 +586,8 @@ void ResourceLoader::StartRequestInternal() { ...@@ -586,6 +586,8 @@ void ResourceLoader::StartRequestInternal() {
request_->SetResponseHeadersCallback(base::Bind( request_->SetResponseHeadersCallback(base::Bind(
&ResourceLoader::SetRawResponseHeaders, base::Unretained(this))); &ResourceLoader::SetRawResponseHeaders, base::Unretained(this)));
} }
UMA_HISTOGRAM_TIMES("Net.ResourceLoader.TimeToURLRequestStart",
base::TimeTicks::Now() - request_->creation_time());
request_->Start(); request_->Start();
delegate_->DidStartRequest(this); delegate_->DidStartRequest(this);
......
...@@ -45319,6 +45319,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -45319,6 +45319,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="Net.ResourceLoader.TimeToURLRequestStart" units="ms">
<owner>csharrison@chromium.org</owner>
<summary>
The time elapsed from URLRequest creation to when a ResourceLoader actually
calls Start on it.
</summary>
</histogram>
<histogram name="Net.ResponseSizeByProcess.Browser" units="KB"> <histogram name="Net.ResponseSizeByProcess.Browser" units="KB">
<obsolete> <obsolete>
The code to record this histogram was removed November 2017. The code to record this histogram was removed November 2017.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment