Skip to content

Commit

Permalink
Track the network error code from the proxy resolver using UMA.
Browse files Browse the repository at this point in the history
BUG=467832

Review URL: https://codereview.chromium.org/1670053002

Cr-Commit-Position: refs/heads/master@{#374305}
  • Loading branch information
akmistry authored and Commit bot committed Feb 9, 2016
1 parent 28a28af commit 6900514
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/proxy/proxy_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "net/proxy/proxy_service.h"

#include <algorithm>
#include <cmath>
#include <utility>

#include "base/bind.h"
Expand All @@ -15,6 +16,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
Expand Down Expand Up @@ -1378,6 +1380,8 @@ int ProxyService::DidFinishResolvingProxy(const GURL& url,
UMA_HISTOGRAM_CUSTOM_TIMES("Net.ProxyService.GetProxyUsingScriptTime",
diff, base::TimeDelta::FromMicroseconds(100),
base::TimeDelta::FromSeconds(20), 50);
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.ProxyService.GetProxyUsingScriptResult",
std::abs(result_code));
}
UMA_HISTOGRAM_BOOLEAN("Net.ProxyService.ResolvedUsingScript",
script_executed);
Expand Down
9 changes: 9 additions & 0 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25705,6 +25705,15 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>

<histogram name="Net.ProxyService.GetProxyUsingScriptResult"
enum="NetErrorCodes">
<owner>eroman@chromium.org</owner>
<summary>
The network error code of resolving a URL by forwarding the request to the
proxy resolver and executing the PAC script.
</summary>
</histogram>

<histogram name="Net.ProxyService.GetProxyUsingScriptTime"
units="100s of microseconds">
<owner>eroman@chromium.org</owner>
Expand Down

0 comments on commit 6900514

Please sign in to comment.