Commit f4799c73 authored by Paul Miller's avatar Paul Miller Committed by Commit Bot

WebView: Enable permanent-consistency variations studies

This has the immediate effect of enabling the 6 UMA-Uniformity-Trial-*
studies, which don't control any features.

Tested correctness like so:
1) Install WebViewLogVerbosifier.apk to enable study logging.
2) Use --disable-field-trial-config to test with the studies from the
    Finch seed, as opposed to the built-in test studies.
3) Run an app that uses WebView (and possibly restart the app, deleting
    variations_stamp in between, until it actually gets the seed).
4) Check for "Active field trial $FOO in group $BAR" in logcat, and that
    these lines include any relevant permanent-consistency studies.
5) Restart the app.
6) Check logcat again and verify that any permanent-consistency studies
    got the same group assignments.
7) Add --reset-variation-state to clear the low-entropy source value.
8) Restart the app.
6) Check logcat again; any permanent-consistency studies may now have
    different groups.

Tested performance like so:
1) Build official, non-component Monochrome with/without this change.
2) Install on Marlin with latest Android.
3) $ third_party/android_tools/sdk/platform-tools/systrace/systrace.py \
      -o ~/trace.html -a org.chromium.webview_shell webview
4) Run SystemWebViewShell.apk several times and note
    WebViewChromiumAwInit.startChromiumLocked wall time.

...and found not much difference. startChromiumLocked takes ~95-105
milliseconds in either case.

NormalizedMurmurHashEntropyProvider::GetEntropyForTrial itself averages
32 microseconds per study on Marlin (measured with base::ElapsedTimer).

BUG=866722

Change-Id: I630f6886cbd0ba803d6a4aba6aaf1fafd07f1cd9
Reviewed-on: https://chromium-review.googlesource.com/c/1385849
Commit-Queue: Paul Miller <paulmiller@chromium.org>
Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618416}
parent 65de35a0
...@@ -50,8 +50,11 @@ Channel AwVariationsServiceClient::GetChannel() { ...@@ -50,8 +50,11 @@ Channel AwVariationsServiceClient::GetChannel() {
return android_webview::GetChannelOrStable(); return android_webview::GetChannelOrStable();
} }
// True is the default, but keep this override so we can revert permanent
// consistency support with a 1-line change.
// TODO(crbug/866722): Remove this, along with the rest of commit bbac4d2c4c.
bool AwVariationsServiceClient::GetSupportsPermanentConsistency() { bool AwVariationsServiceClient::GetSupportsPermanentConsistency() {
return false; return true;
} }
bool AwVariationsServiceClient::OverridesRestrictParameter( bool AwVariationsServiceClient::OverridesRestrictParameter(
......
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