Reduce the noise by warming the caches (start the app
package 3 times without capturing the logs). Then, run the app 5x times
before/during/after VM run and use the reportMetrics to send the data.
Create two different test cases, one for the Settings app package and
one for the Camera app. Verify if the package is installed before
starting the test.
Bug: 236621823
Test: atest AVFHostTestCase#testCameraAppStartupTime and then run
atest AVFHostTestCase#testSettingsStartupTime and verify the reported
metrics
Change-Id: I3ca7761b117bdbf2262b043c015f96196459308c
The measured app startup time was not collected correctly while running
metrics because the app was not killed. Tear down the application and
get the cold app startup time.
Bug: 236621823
Test: atest AVFHostTestCase#testAppStartupTime
Change-Id: I85f145373bc773d8371df40f3fadd434cba60737
Add a host side test as part of MicrodroidTestCase which starts a
Microdroid VM that reserves 80% of the device's memory reported from
/proc/meminfo (MemFree - field) and touches all the allocated guest
memory with a tmpfs filesystem and successive copies from /dev/zero.
This step is necessary to create host stage2 fragmentation and we
measure a cold app startup time delta before and after we tear-down
the VM.
The following metrics will be reported during atest
AVFHostTestCase#testAppStartupTime:
app_startup/com.android.settings/total_time/before_vm
app_startup/com.android.settings/wait_time/before_vm
app_startup/com.android.settings/total_time/during_vm
app_startup/com.android.settings/wait_time/during_vm
app_startup/com.android.settings/total_time/after_vm
app_startup/com.android.settings/wait_time/after_vm
Bug: 236621823
Test: Verified localy using atest
Change-Id: Iede9d6f0507c8d7e56b3e32324441ff11e54fa1e
Vendor code can set a property to tag performance metric names. This can
be useful if devices in the lab have varying performance
characteristics.
Test: atest -p packages/modules/Virtualization:avf-postsubmit
Change-Id: I46478471571639a145079cdc296b9824f1328fc3
Following are changes in this CL
1. add boot time info that retrieved from dmesg
2. add bootloader break time info that retrieved from prop
"ro.boot.boottime"
3. break down to 4 cases
Bug: 236799228
Test: atest AVFHostTestCases
Change-Id: I8b8fbc12909dec56107448cb16bdc445f3bbca20
Cuttlefish does not support `adb reboot bootloader`; the instance
reboots back to Android. This breaks AVFHostTestCases that assume
each device is compatible with fastboot. Skip the affected tests, as
well as code in tearDown() which resets the device back to pKVM enabled
mode.
Test: 'atest AVFHostTestCases' on aosp_cf_x86_64_phone
Change-Id: I4fc5a47b3cb3af8f66d8493ae99cfbc44f8d3d55
The string that the assumption looks for is actually printed on stderr,
not stdout as the code currently expects. As a result, the test was
skipped as expected on _pkvm builds, but also unexpectedly on all other
builds as well.
Bug: 236799228
Bug: 244769139
Test: atest AVFHostTestCases on oriole_pkvm-userdebug
Change-Id: Ic28c4594277520841c7eface9dcf0e8998e5e0a4
Metrics are not being picked up by the CI from this test. TestMetric
object must be a @Rule.
Test: atest AVFHostTestCases
Change-Id: I02d82160196f01301e46cf4852cc5daef6cbb203
The previous attempt in I20435fa3619ae428c167de4195ef1acf40261057
resulted in an exception, failing the test instead of skipping it.
Move the check earlier, at the beginning of the test, and make it
an assumption, not assertion.
Bug: 236799228
Bug: 244769139
Test: atest AVFHostTestCases on oriole_pkvm-userdebug
Change-Id: Ic0f1fdea3143833d9e35b85ee9470c20a08630b9
The recently introduced testBootEnableAndDisablePKVM fails on _pkvm
builds because the pkvm_enabler service checks if pKVM is enabled and if
not, sets the corresponding flag in the misc partition and reboots the
device. The test overrides this config in fastboot, resulting in a
bootloop and making lab devices unavailable. Skip the test if it detects
that the flag in misc has been set.
Bug: 236799228
Bug: 244769139
Test: atest AVFHostTestCases on oriole_pkvm-userdebug
Change-Id: I20435fa3619ae428c167de4195ef1acf40261057
This CL renames host test heper com.android.microdroid.test to
com.android.microdroid.test.host package to eventually have two
separate separate packages for the device test helper and host
test helper.
Test: atest ComposTestCase
Change-Id: I527fcb91299d87a7155ad2818fbd9b499a381f29
This CL adds MetricsProcessor class to calculate metrics stats
for both device tests and host tests.
Test: atest MicrodroidBenchmarks
Change-Id: I4f742d6800f14c857a5d0e0718e09870e8ca6547
Compilation on staged APEX takes too long on Cuttlefish and the test
times out in postsubmits. Skip the test on Cuttlefish, like we do for
other similar tests.
Test: atest AVFHostTestCases
Change-Id: I4303e6e69b373b2a1243f481437f62b5b3a1f900
1. abtd run post submit and confirm result is PASS. http://sponge2/0ef87667-7f24-4ca7-a3fa-eb31bbc0bf23
2. dalvik.vm.systemservercompilerfilter=speed will cause boot time is not as expected so remove it in this CL. Trace in b/243926823
Bug: 243197801
Test: atest AVFHostTestCases
Change-Id: Ie8cd9e5f6868f1cb3e297807ae651da08282b795
1. Remove postsubmit in TEST_MAPPING. Plan to run it via ABTD to make
sure this test case can run under TF normally. After that, will
submit another CL to add in TEST_MAPPING.
2. Add rebootAndWaitBootCompleted in setup to make sure no staged
session is left
3. remove assert for boot time compare temporarily
4. Add enableAdbRoot() after reboot because somehow it will become
normal user after reboot
5. Add retry in reInstallApex() and compileStagedApex() because it seems
after reboot sometimes the 2 functions will be fail
Bug: 243197801
Test: atest ComposBenchmarkApp
Change-Id: Icd70fc2dd1632f0b67954b2260d9d36db8249bdf
This reverts commit 5f522d766f.
Reason for revert: testBootWithAndWithoutCompOS() fails in postsubmits
Change-Id: Ie8a0da4024a38dcab691839e2ee369ba62821360
test_boot_time_with_comp_os function to AOSP
testBootWithAndWithoutCompOS will find the boot elapsed time with and
without CompOS.
Bug: 236799228
Test: atest AVFHostTestCases
Change-Id: Ie61c40b28a9d104002fc946da8b151910fb0b0c8