Commit 5fbfa17e authored by Mike Wittman's avatar Mike Wittman Committed by Commit Bot

[Sampling profiler] Move to 50/50 experiment on Android canary

Move from a 10%/10% experiment to a 50%/50% experiment to provide the
maximum signal for analysis of experiment results. The implementation
in https://crrev.com/2453795 moves work to the render thread and this
enables evaluation of the impact in the wild.

Bug: 1004855
Change-Id: Id7c0c75bba2137aaccd78b7dd320fae0c7172004
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2458388Reviewed-by: default avatarEtienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814875}
parent 86c246ad
......@@ -127,6 +127,9 @@ class AndroidPlatformConfiguration : public DefaultPlatformConfiguration {
RuntimeModuleState GetRuntimeModuleState(
base::Optional<version_info::Channel> release_channel) const override;
RelativePopulations GetEnableRates(
base::Optional<version_info::Channel> release_channel) const override;
void RequestRuntimeModuleInstall() const override;
double GetChildProcessEnableFraction(
......@@ -175,6 +178,19 @@ AndroidPlatformConfiguration::GetRuntimeModuleState(
return RuntimeModuleState::kModuleNotAvailable;
}
ThreadProfilerPlatformConfiguration::RelativePopulations
AndroidPlatformConfiguration::GetEnableRates(
base::Optional<version_info::Channel> release_channel) const {
if (release_channel) {
CHECK(*release_channel == version_info::Channel::CANARY ||
*release_channel == version_info::Channel::DEV);
// Use a 50/50 experiment to maximize signal in the relevant metrics.
return RelativePopulations{0, 50};
}
return DefaultPlatformConfiguration::GetEnableRates(release_channel);
}
void AndroidPlatformConfiguration::RequestRuntimeModuleInstall() const {
// The install can only be done in the browser process.
CHECK_EQ(metrics::CallStackProfileParams::BROWSER_PROCESS,
......
......@@ -128,13 +128,15 @@ MAYBE_PLATFORM_CONFIG_TEST_F(ThreadProfilerPlatformConfigurationTest,
GetEnableRates) {
using RelativePopulations =
ThreadProfilerPlatformConfiguration::RelativePopulations;
EXPECT_EQ((RelativePopulations{80, 20}),
config()->GetEnableRates(version_info::Channel::CANARY));
#if defined(OS_ANDROID)
EXPECT_EQ((RelativePopulations{0, 50}),
config()->GetEnableRates(version_info::Channel::CANARY));
// Note: death tests aren't supported on Android. Otherwise this test would
// check that the other inputs result in CHECKs.
#else
EXPECT_CHECK_DEATH(config()->GetEnableRates(version_info::Channel::UNKNOWN));
EXPECT_EQ((RelativePopulations{80, 20}),
config()->GetEnableRates(version_info::Channel::CANARY));
EXPECT_EQ((RelativePopulations{80, 20}),
config()->GetEnableRates(version_info::Channel::DEV));
EXPECT_CHECK_DEATH(config()->GetEnableRates(version_info::Channel::BETA));
......
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