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

Issue 1224343002: Add Net.ProxyScriptFetchSuccessDuration UMA to record how long PAC script fetches take. (Closed)

Created:
5 years, 5 months ago by cbentzel
Modified:
5 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Net.ProxyScriptFetchSuccessDuration UMA to record how long PAC script fetches take. Currently PAC script fetches time out after 5 minutes. It's possible that this was a much higher value than needed. This limit is also problematic in certain cases. For example, if a PAC script is retrieved over HTTPS, and the computer recently joined a network which has a captive portal that blackholes all HTTPS traffic then that user will be unable to sign in to the captive portal with Chrome while waiting for the limit to be hit. BUG=251682 Committed: https://crrev.com/27d2e5e5e2eb429943a27b4c23cf120733ea39a7 Cr-Commit-Position: refs/heads/master@{#338314}

Patch Set 1 #

Patch Set 2 : Reset fetch_start_time_ during ResetCurRequestState #

Patch Set 3 : Skip recording fetch time when PAC URL has a data scheme. #

Total comments: 1

Patch Set 4 : Rename UMA to Net.ProxyScriptFetcher.SuccessDuration #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -0 lines) Patch
M net/proxy/proxy_script_fetcher_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl.cc View 1 2 3 4 chunks +10 lines, -0 lines 2 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 1 chunk +9 lines, -0 lines 2 comments Download

Messages

Total messages: 24 (9 generated)
cbentzel
I also considered measuring this in the ProxyScriptDecider, but kept it here. This will not ...
5 years, 5 months ago (2015-07-09 20:43:39 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224343002/1
5 years, 5 months ago (2015-07-09 23:20:17 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/29197) (exceeded global ...
5 years, 5 months ago (2015-07-09 23:52:05 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224343002/20001
5 years, 5 months ago (2015-07-10 13:16:21 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/37204) (exceeded global ...
5 years, 5 months ago (2015-07-10 13:44:53 UTC) #10
Elly Fong-Jones
lgtm
5 years, 5 months ago (2015-07-10 15:28:12 UTC) #11
cbentzel
+asvitkine for histograms.xml
5 years, 5 months ago (2015-07-10 16:17:37 UTC) #13
cbentzel
+asvitkine for histograms.xml
5 years, 5 months ago (2015-07-10 16:17:38 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224343002/40001
5 years, 5 months ago (2015-07-10 16:21:50 UTC) #16
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1224343002/diff/40001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1224343002/diff/40001/tools/metrics/histograms/histograms.xml#newcode21768 tools/metrics/histograms/histograms.xml:21768: +<histogram name="Net.ProxyScriptFetchSuccessDuration" units="milliseconds"> Nit: Optional suggestion: Name it: ...
5 years, 5 months ago (2015-07-10 16:22:35 UTC) #17
cbentzel
On 2015/07/10 16:22:35, Alexei Svitkine wrote: > lgtm > > https://codereview.chromium.org/1224343002/diff/40001/tools/metrics/histograms/histograms.xml > File tools/metrics/histograms/histograms.xml (right): ...
5 years, 5 months ago (2015-07-10 16:25:23 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224343002/60001
5 years, 5 months ago (2015-07-10 16:28:31 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 5 months ago (2015-07-10 17:40:11 UTC) #22
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/27d2e5e5e2eb429943a27b4c23cf120733ea39a7 Cr-Commit-Position: refs/heads/master@{#338314}
5 years, 5 months ago (2015-07-10 17:41:15 UTC) #23
eroman
5 years, 5 months ago (2015-07-13 21:39:05 UTC) #24
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1224343002/diff/60001/net/proxy/proxy_script_...
File net/proxy/proxy_script_fetcher_impl.cc (right):

https://codereview.chromium.org/1224343002/diff/60001/net/proxy/proxy_script_...
net/proxy/proxy_script_fetcher_impl.cc:138: fetch_start_time_ =
base::Time::Now();
I suggest using base::TimeTicks over base::Time for measuring elapsed times.

base::Time is influenced from changing the system clock, so it is more likely to
measure walltime deltas incorrectly.

While base::TimeTicks is better in this regard, it has inconsistencies with how
time lapses measured across system sleep/suspend work, because unfortunately
last I looked we didn't use a consistent monotonic clock across platforms (ticks
will stand still on some platforms, but increase on others while sleeping).

... Even so, that is not likely to impact this histogram since fetches
interrupted by a suspend/sleep will almost surely fail (either aborted or
network error).

https://codereview.chromium.org/1224343002/diff/60001/net/proxy/proxy_script_...
net/proxy/proxy_script_fetcher_impl.cc:291:
UMA_HISTOGRAM_TIMES("Net.ProxyScriptFetcher.SuccessDuration",
I see you considered putting it in ProxyScriptDecider. This should be fine to
start getting some data.

Note that an advantage of ProxyScriptDecider is we might be rejecting slow
successful fetches in ProxyScriptDecider::DoVerifyPacScript().

For instance a hypothetical situation would be a captive portal that makes the
proxy script fetch really slow, however it still completes with an HTTP 200
code. The page served up however is an HTML page rather than a PAC script, so
DoVerifyPacScript() subsequently fails and we fallback to not using the script.

https://codereview.chromium.org/1224343002/diff/60001/tools/metrics/histogram...
File tools/metrics/histograms/histograms.xml (right):

https://codereview.chromium.org/1224343002/diff/60001/tools/metrics/histogram...
tools/metrics/histograms/histograms.xml:21772: +    time spent doing proxy
auto-discovery, or failed attempts at retrieiving PAC
typo: retrieiving --> retrieving

https://codereview.chromium.org/1224343002/diff/60001/tools/metrics/histogram...
tools/metrics/histograms/histograms.xml:21773: +    scripts.
Additionally, this does not include the time spent for loading data: URLs.
However it _does_ include the time spent for file:// URLs

Powered by Google App Engine
This is Rietveld 408576698