summaryrefslogtreecommitdiff
path: root/apct-tests
AgeCommit message (Collapse)Author
2020-01-29Merge changes from topic "res-loader"Ryan Mitchell
* changes: Refactor ResourcesLoader Tests Refactor ResourcesLoader APIs
2020-01-28Refactor ResourcesLoader TestsRyan Mitchell
This change refactors the tests for ResourcesLoaders to support the new concept of loaders owning providers. Bug: 147359613 Test: atest ResourceLoaderTests Change-Id: Id61dc27bf5876afe10c25ed57333541131e910b7
2020-01-27WM: Defer transactions for BLAST Surfaces too.Robert Carr
For switching on BLAST we are implementing deferred transactions for compatibility. Presently the BLAST Surface is constructed by the ViewRootImpl and so the WM has no reference to pass when using it as a barrier layer for deferTransactionUntil. To resolve this we construct and hold a reference to the BLAST Surface on the server side, and pass it down to the client in relayoutWindow. We don't use the WindowStateAnimator surface directly as both the BLAST Adapter and the WindowStateAnimator would then be setting crops on it. Bug: 146598493 Test: Builds, existing tests pass. Change-Id: I6513e0442f5c75f01eb8dde5f1924dd7b636163c
2020-01-17Preserve intended width/height for Blast adapter layersValerie Hau
Some surfaces may be a different size from the requested width/height. Pass back calculated width/height from WindowStateAnimator back to ViewRootImpl Bug: 147674215, 147689472 Test: build, boot, manual Change-Id: Ib557a4769d79e6414b9bebab8cb006adfb551e4d
2019-12-19Adding more granular startUser perf benchmarks.jovanak
Fixes: 146154399 Test: atest UserLifecycleTests Change-Id: Ie781edc70a8a2fc0635e74350c139b5c09441dca
2019-12-13Add performance test for OomAdjusterJing Ji
Bug: 140254153 Test: atest -c ActivityManagerPerfTests:OomAdjPerfTest#testOomAdj Change-Id: Id12667c71300e6fe4dc063c83807834bbdb5e62a
2019-11-15Merge "Introduce user types"Adam Bookatz
2019-11-14Introduce user typesBookatz
Introduces the notion of 'user types' to UserManager. Previously, users only had properties, set by UserInfo flags. We now solidify some of these as formal user types. Each user must be of precisely one user type. The configuration of each type is defined in a UserTypeDetails object. Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and 'normal' - that were set via UserInfo flags are now controlled via UserType. Previous UserInfo flag methods for categorizing these are still supported as long as no user of of more than one type. If a user was (e.g.) previously both Guest and Demo, it is now invalid and will be prevented from upgrading. This should not be a problem in AOSP, where these 'types' were assumed mutually exclusive. UserTypeDetails is sufficiently general to support future non-managed profiles. To this end, the logic for specifying badges and their colors/labels is contained by UserTypeDetails, and therefore UserManager is responsible for delivering the corresponding badge information. Bug: 142151520 Test: added new test class UserManagerServiceUserTypeTest Test: added additional tests in UserManagerServiceUserInfoTest Test: added additional tests in UserManagerTest Test: added additional tests in UserManagerServiceCreateProfileTest Test: created UserTests to run the various pm.User*Test's Test: atest \ com.android.server.pm.UserTests \ UserLifecycleTests \ ManagedUserContentResolverTest \ CtsDevicePolicyManagerTestCases \ CtsMultiUserHostTestCases \ com.android.server.devicepolicy.DevicePolicyManagerTest \ com.android.server.am.UserControllerTest \ CreateManagedProfileTaskTest Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest using adb shell getprop persist.sys.max_profiles # for 5 and -1 Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
2019-11-13Merge "Kill overscan insets and outsets"Jorim Jaggi
2019-11-12Kill overscan insets and outsetsJorim Jaggi
Also remove WindowManagerStressTest because that has been replaced with proper perf test. Test: Boots Bug: 143255833 Change-Id: I1d293cda7c82d0aa1c3a6cc694c74bf7d10cc974
2019-11-12Capture method tracing for window testRiddle Hsu
It will generate method profiling trace data on the last 2 iterations that won't be counted in result metrics. Bug: 131727899 Test: atest WindowAddRemovePerfTest Change-Id: Ifd6f594481785deed2ebeb6e1d198f6f8728d3f4
2019-10-17Fix missing renaming of PerfTestActivityRiddle Hsu
1be1dd6 renamed StubActivity to PerfTestActivity. Bug: 131727899 Test: atest PackageManagerPerfTest atest AutofillPerfTests:LoginTest Change-Id: I90ad0f28ab6a3c152b16f7587c5434e6fddf18a3
2019-10-15Add trace based window manager perf testRiddle Hsu
This may be temporary solution that parses the output of atrace in text format on the device side. Once the perfetto processing infrastructure is available (b/139542646) for generic test environment, we can migrate to use that. Bug: 131727899 Test: atest InternalWindowOperationPerfTest Change-Id: Ic0304c292e42159fb11dee37152867290808f281
2019-10-15Rename StubActivity to PerfTestActivityRiddle Hsu
The activity is real. Bug: 131727899 Test: atest CorePerfTests Change-Id: I7fdb41aa5447329c0b1b6960f9e3d808be69648d
2019-09-26Add Resources Perf TestsRyan Mitchell
This changes adds benchamrks for Resources, ResourcesManager, OverlayManager, and Resources.Theme. Bug: 136085555 Test: atest OverlayManagerPerfTest Test: atest ResourcesManagerPerfTest Test: atest ResourcesPerfTest Test: atest ResourcesThemePerfTest Change-Id: I6a3b3275399c161e55ff6ce34e7bc2ae5556edf1
2019-09-25Merge "Whitelist packages for user types"TreeHugger Robot
2019-09-25Merge "Fix the script to run perf test"TreeHugger Robot
2019-09-24Whitelist packages for user typesBookatz
Creates a new SystemConfig xml entry which allows a device to whitelist system packages to be installed on users when they are created, based on the type of user. System packages will be installed on users when they are created, or during OTAs, based on this whitelist. The whitelist can be enabled/disabled via a Config resource. For any user type, system packages can be whitelisted or blacklisted. If it is both (for the same user type), the blacklist takes priority. If it is neither, it won't be installed (since it isn't whitelisted). If a system package isn't mentioned in the whitelist file at all, for any user, then its behaviour depends on the Config resource value, which can optionally implicitly whitelist all such apps on all users. For now, the list is mostly empty and the default config is set to be enabled but implicitly whitelist all system packages that are not mentioned. Test: atest FrameworksServicesTests:SystemConfigTest Test: atest com.android.server.pm.UserManagerServicePackageWhitelistTest Test: manually test user 0 by flashall -w and checking packages Test: manually test OTA by setting setprop persist.pm.mock-upgrade 1 Bug: 134605778 Change-Id: Ia098c1f597f66a1c946cfcc9b7771c25e8ceabf7
2019-09-24Fix the script to run perf testTony Mak
Test: Run the script Change-Id: I6696dafce8782173adbfebc3f5fca661223bd147
2019-09-20Add wallpaper leash for remote and recents animationsWinson Chung
Bug: 140626334 Test: atest RecentsAnimationControllerTest Test: atest RemoteAnimationControllerTest Change-Id: Id638256983801e722b57da0abd22e3e480d5559d Signed-off-by: Winson Chung <winsonc@google.com>
2019-09-04Adding create user benchmark to UserLifecycleTests.jovanak
We already have createAndStartUser - but we should aim for more granular benchmarks as well, and this isolate create user timing only. We'll keep createAndStartUser for now, since it contains all the historical data associated with it. Bug: 140101272 Test: atest UserLifecycleTests Change-Id: I0df72c90f7fd7bcdc8928d8510ffe36094a4d832
2019-08-11Pass the captured snapshot data to Launcher when recents animation isTracy Zhou
cancelled. In the current implementation, when recents animation is cancelled due to stack order change, window manager replaces the surface with a snapshot before cancellation. Launcher needs to acquire the snapshot in order to switch the live tile into snapshot mode, and yet because the recents animation is cancelled, that snapshot can no longer be acquired anymore. This change takes care of this "relay" process. Fixes: 138683199 Test: N/A Change-Id: I1c11af38c2bdc442e3b45d0b5f0c7e7e37c2b0f0
2019-08-08Skipping managed profile tests for devices that don't support MANAGED_USERS.jovanak
Fixes: 13913456 Test: atest MultiUserPerfTests - on automotive, since it doesn't have managed users feature Change-Id: I8dec1291ddeb6e1bfc6142fece08e1ab2779c89a
2019-07-30Merge "Add performance test for operations of recents activity"TreeHugger Robot
2019-07-26Add performance test for operations of recents activityRiddle Hsu
Includes startRecentsActivity, startActivityFromRecents, and IRecentsAnimationController.finish. Also make the output stats of manual benchmark customizable. Bug: 131727899 Test: atest RecentsAnimationPerfTest Change-Id: I89a08248b4f215c990640aeb50800759d6dbcf22
2019-07-24Pass callingPackage in UserLifecycleTest#startAppRobert Horvath
Calling IActivityTaskManager#startActivity requires the callingPackage to be set correctly as of ag/8668823, otherwise a SecurityException is thrown. Bug: 138095678 Test: Enable multi-user by declaring the "android.software.managed_users" feature and setting "config_multiuserMaximumUsers" to greather than 1. Then: `atest android.multiuser.UserLifecycleTests#managedProfileUnlockAndLaunchApp` Change-Id: Iab7cf0198a02a976ef5c54e4b87fb127aa7eac9a
2019-07-18Add performance test of add/remove windowRiddle Hsu
Also add support of multiple stats for manual benchmark. So it can provide more details of separated steps. Bug: 131727899 Test: atest WindowAddRemovePerfTest Change-Id: Ia0b49c4a5e139449ee313c6ccbbe500e13327b8a
2019-06-21Add performance test for relayoutRiddle Hsu
Bug: 131727899 Test: atest RelayoutPerfTest Change-Id: Id9aa4929d3b80a5ba1e407b1411d54b8a313b85a
2019-06-03Merge "PerftestMultiuserDummyApp > MultiUserPerfDummyApp"TreeHugger Robot
2019-05-31Multiuser perf test: re-launching app in profileBookatz
Times starting (unlocking) and launching a previously-launched app in an already-created, but no-longer-running, profile. This represents how long it would take to immediately start a profile and launch an app within it for a re-used profile. Bug: 129857107 Test: atest multiuser.UserLifecycleTests#managedProfileUnlockAndLaunchApp_stopped Change-Id: I34cc9aeef07ea6481f4d168cda47b5dea69a5a74
2019-05-30PerftestMultiuserDummyApp > MultiUserPerfDummyAppBookatz
Renames PerftestMultiuserDummyApp to MultiUserPerfDummyApp. This dummy app will be added to the platform testing, and it's useful for the name of the dummy app to be alphabetically adjacent to the test app (MultiUserPerfTests). Also removes an unnecessary Android.mk file in an empty directory. Bug: 133510429 Test: atest multiuser.UserLifecycleTests#managedProfileUnlockAndLaunchApp Change-Id: Ifcdaa36e39b6d2a5e42decd9277d9afbf3a75d78
2019-05-22Merge "Fix multiuser.UserLifecycleTests dummy app"TreeHugger Robot
2019-05-21Fix multiuser.UserLifecycleTests dummy appBookatz
The dummy app (used in managedProfileUnlockAndLaunchApp and managedProfileCreateUnlockInstallAndLaunchApp) wasn't compiling properly, so we fix that here. Test: atest multiuser.UserLifecycleTests#managedProfileUnlockAndLaunchApp Test: atest multiuser.UserLifecycleTests#managedProfileCreateUnlockInstallAndLaunchApp Change-Id: I3456824e2d31c6f2d2f9f6b892703a02c141d91c
2019-05-15Whitelist all perms on installExistingPackagePhilip P. Moltmann
The code allows to also whitelist only a select set of permissions, but this is not yet exposed in the API. Also: Fix up shell commands for restricted permissions Fixes: 132368462 Test: - Enabled app via device admin in secondary profile -> verified that permissions were whitelisted - Installed existing and new app using --restrictpermissions and not -> verified that permissions were whitelisted or not atest AppRestrictionsHelperTest RestrictedPermissionsTest Change-Id: I9787e63d8beb8f6b1ba2d15532d4c0f69dbdf863
2019-05-03Merge "Lazy-load textclassifier settings." into qt-dev am: 9829cf5451Abodunrinwa Toki
am: 772447f0bd Change-Id: Ia1e191f134c94e0dcfd08b92e58f2f53b7a6eebe
2019-05-02Lazy-load textclassifier settings.Abodunrinwa Toki
Re-enables reading settings from device_config. See: I6b7ab56e4015448ee068deb49e7f6fa133fea53c Updates tests. Updates documentation. Bug: 129934185 Test: atest android.view.textclassifier Test: (Performance) Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh Compare performance results with ConfigParser.ENABLE_DEVICE_CONFIG set to true vs false. Trivial regression recorded i.e. 1.03x. Test: (Manual) Change flags and see them reflected. e.g. adb shell cmd device_config put textclassifier system_textclassifier_enabled false Verify that app no longer uses the OEM TCS but the AOSP TC. Change-Id: I4c6ff781c97fc2e3d3da55dc49123fa1d759670a
2019-04-23Merge "Fix performance regression by fixing keys used in Typeface.Builder" ↵Seigo Nonaka
into qt-dev am: 5f873a09a0 am: 995bf1e3e6 Change-Id: I2245df4205a28af10fa08eee592176bc6a73ae8e
2019-04-23Fix performance regression by fixing keys used in Typeface.BuilderSeigo Nonaka
The key used in Typeface.Builder is different from the key used in findFromCache method. The problem is key generation in Typeface.Builder since the key should be created from requested parameters not the actual font styles. Here is the raw performance differences on walleye-userdebug android.graphics.perftests.TypefaceCreatePerfTest(us): createFromResources: 248 -> 23: (-225, -90.7%) Bug: 131167183 Test: manually collected perf test result. Change-Id: Idea25095979707ac84b7f4bc1ede0c2daefd6127
2019-04-16Multi-user profile perf-testsBookatz
Tests that time how long it takes to create/start/install-an-app/launch-an-app in a secondary profile. Also, in the test, adds newly created users to the remove list, so that even if the test crashes, the user will get removed by test cleanup. Test: atest multiuser.UserLifecycleTests Bug: 129857107 Change-Id: I13f7cb1628bf4a97771cb1b143ab524d7d0a2073
2019-04-11Reordering UserLifecycleTests in prep for moreBookatz
Will add more tests. Want the profile tests together. To make review easier, moving a test away from the profile tests. Test: N/A Change-Id: Idf757414dd35acb46a41701a3981cdf37a7779eb
2019-04-04Add getTextClassifier perf testTony Mak
This helps us to evaluate the fix. BUG: 129695635 Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh Change-Id: I7d2d019faecb3721c044a43e24d86d98a08be64b
2019-04-03Merge "MultiUserPerfTest - test restart profile"TreeHugger Robot
2019-04-03Merge "MultiUserPerfTest test switch to pre-existing user"TreeHugger Robot
2019-04-02Merge "Add diffing to KernelCpuThreadReader"Misha Wagner
2019-04-01Fix AndroidTest.xmlTony Mak
Test: Run run.sh Change-Id: If9f088dccacd30313380bedba4f8731ca6b47477
2019-04-01Move TextClassifierPerfTest to a separate packageTony Mak
So, other tests in other package no longer affect us. Currently, TextClassifierPerfTest is not run continuously because of failures in other packages. BUG: 129695635 Test: Run run.sh Change-Id: I2253360d98404608193b53c8b34611c2ff1b231e
2019-03-29MultiUserPerfTest test switch to pre-existing userBookatz
Creates two new MultiUserPerfTests, timing how long it takes to switch to a pre-existing user, one for when the user is already-started, and the other for when it is stopped. Bug: 126745587 Test: make MultiUserPerfTests && adb install -r ${ANDROID_PRODUCT_OUT}/data/app/MultiUserPerfTests/MultiUserPerfTests.apk && adb shell am instrument -e class android.multiuser.UserLifecycleTests -w com.android.perftests.multiuser/androidx.test.runner.AndroidJUnitRunner Change-Id: I734f4971ad992e906a0090f4ef328255ab2a0349
2019-03-29MultiUserPerfTest - test restart profileBookatz
Creates a profile, starts it, stops it, then restarts it, timing how long the restart takes. This gives an indication of how long it takes to start a previously-initialized profile, and mimics toggling setQuietModeEnabled. Right now, this process is especially slow due to RoleManagerService.onStartUser(), so it is worthwhile tracking this. Bug: 129415917 Test: atest android.multiuser.UserLifecycleTests#managedProfileUnlock_stopped Change-Id: Ic7f3bdb6fa7daaab53cb23dbf8e8a68e293d23b2
2019-03-27Add diffing to KernelCpuThreadReaderMisha Wagner
We want to not use WestWorld's diffing so that we can apply thresholds on the diffs. This is further explained in the KernelCpuThreadReaderDiff documentation. Test: atest KernelCpuThreadReaderDiffTest Bug: 129387487 Change-Id: I638ae92a28236830444dc80e470114a0e23d79a4
2019-03-20Clean up KernelCpuThreadReaderMisha Wagner
This includes (as well as nits by IntelliJ): - Removing getCurrentProcessCpuUsage, as it was only used in tests - Updating class documentation - Adding @Presubmit annotations to tests - Reformat using google-java-format Test: atest KernelCpuThreadReaderTest Change-Id: I710773043b9e9ef40545c20667fe2f79e9915e43