device_google_gs-common/performance/experiments/pixel-experiments-recovery.sh
Dmitry Skiba afc6c28401 Add recovery support for perf experiments.
This change establishes a place for perf experiments and adds a
script to delay experiments for recovery purposes. For more info
see go/pixel-perf-experiment-whatif.

Bug: 365855872
Test: build/flash, set .Perf__experiments_delay_seconds=10, verify that vendor.perf.allow_experiments=1 after 10 seconds
Flag: NONE controlled by Mendel instead
Change-Id: I78db482542066d5d5646d8c303dbe88054cfe66d
Signed-off-by: Dmitry Skiba <dskiba@google.com>
2024-12-05 09:07:27 +00:00

15 lines
602 B
Bash
Executable file

#!/vendor/bin/sh
# This script delays experiments by the specified amount of seconds. The delay is not needed for
# the normal operation, but becomes essential for the rare case (which "should not happen") where
# an experiment causes really bad issues (e.g. crashes the kernel). In such case the delay gives
# GMSCore an opportunity to fetch fresh experiments snapshot (with the bad experiment disabled).
#
# See go/pixel-perf-experiment-whatif for more info.
delay_seconds="$1"
if [ -n "$delay_seconds" ]; then
sleep "$delay_seconds"
/vendor/bin/setprop vendor.perf.allow_experiments 1
fi