19 Commits

Author SHA1 Message Date
Eric Holk
12daf359e7 Add Layout Inflater Interactive Microbenchmark
This allows us to quickly test small changes in layout inflation performance.

TEST: mma &&
      adb install $OUT/system/app/startop_test_app/startop_test_app.apk;
      Run the app
Change-Id: I396157686d1e16ae2a7083a070fe1f622c05b15f
2019-11-15 17:09:02 +00:00
Eric Holk
afb9b08dd8 Refactor interactive microbenchmarks
Replaces the SystemServer Benchmark activity with one that has
several sets of benchmarks grouped into categories. This will make it
easier to add more benchmarks that do not logically fit with the
categories we already have.

This does not remove any of the other benchmark activities, but in a
follow up CL, we should remove those since they are covered by the
Interactive Microbenchmarks activity.

This also does not adjust the non-interactive mode, which should also
happen in a followup.

Change-Id: I1d079362df0d32642525ede5b41779d76a5735ec
2019-11-14 17:29:08 +00:00
David Sehr
8fcf8f468e Add initialization check benchmark
Add a benchmark to test the cost of initialization checks.  The
application run with JIT versus AOT shows the cost of initialization
checks of other classes.

Bug: none
Test: run the test, compile, run the test again
Change-Id: Ic15d872e2284084e003056849453150fb533ca81
2019-10-23 15:12:02 -07:00
David Sehr
ac51da9c4e Separate CPU intensive test from system server
Separate into two activities, as they are unrelated.

Bug: none
Test: run the applications
Change-Id: I390c1351d5e9c3ecdd0b863b7aceac03e735ff58
2019-10-23 10:08:25 -07:00
Eric Holk
6531bc9c7b Add more system server benchmarks
This change adds some of the top binder calls from AppOpsManager, UserManager,
and ConnectivityManager.

Change-Id: I8c87a5d58d68b962927c4886c1bba90f3976d587
2019-10-14 12:01:30 -07:00
Eric Holk
1017c9c2ec Add acquire/release wake lock benchmark
Change-Id: Iae151d18a80f5acfdd205d9af1d2ee677153b8db
2019-10-11 17:12:24 -07:00
Eric Holk
3e4452b275 Add getPackageIntentForSender benchmark
ActivityManagerService.getPackageForIntentSender is the second most common
binder transaction during an MPTS run.

Change-Id: I628857d9f323102db3d66da0311f36554cbd797b
2019-10-11 16:42:31 -07:00
Eric Holk
c62b083fc8 Add non-interactive system server benchmarks
This allows benchmarking system server when not sitting at the device. To use
it, launch the NonInteractiveSystemServerBenchmarkActivity and then wait awhile.

The benchmark results will be available at
/sdcard/Android/data/com.android.startop.test/files/benchmark.csv

Change-Id: If7697657228f6e631846fdb79a5a5acfdaf7fe65
2019-10-11 16:10:56 -07:00
Eric Holk
77743f31c8 Refactor system server benchmarks
This change does a better job of separating the UI code from the benchmark
running code, with the goal of enabling a non-interactive version of the
benchmarks.

Change-Id: Id7a673b9abca69cd9643a487f7b05f965e1f2614
2019-10-11 16:10:48 -07:00
David Sehr
decc2b716d Add a threaded CPU-intensive benchmark to test
In order to understand how simpleperf reports percentages from a whole
system, craft a benchmark set that runs a CPU-intensive thread a number
of times.

Bug: none
Test: run the app
Change-Id: I7c8748f9b5da89be20775a5af60b223d4673023b
2019-09-20 15:32:50 +00:00
TreeHugger Robot
eae6b54054 Merge "Add more system_server benchmarks" 2019-09-18 00:17:18 +00:00
Eric Holk
e5cdca764b Make Startop Test App run on O and higher
Change-Id: I60af3e06680aa9d3473be11f8d93447166e5fe71
2019-09-12 10:39:17 -07:00
Eric Holk
c2d4071b2a Add more system_server benchmarks
This CL adds:
* getLaunchIntentForPackage
* getPackagesForUid
* getPackageUid
* checkPermission
* checkSignatures
* queryBroadcastReceivers
* hasSystemFeature
* resolveService
* getRunningAppProcesses

Bug: 140743821
Change-Id: I61118f29ee4b4113b6d0f9b95458de3798bc4ce7
2019-09-10 15:20:35 -07:00
Eric Holk
4777ee0621 Run system_server benchmarks for 5 seconds
Especially for short running methods, this gives us better results and also
gives us more data for things like simpleperf to work on.

Since we don't know ahead of time how many times each benchmark will run, we had
to switch the mean and standard deviation formulas to one that supports running
updates. This has the advantage of making it constant space.

Bug: 140743821
Change-Id: I3e6b6b44d3bd573bad8afc8831226194147b108a
2019-09-10 14:22:12 -07:00
Eric Holk
13926c385c Add additional system_server benchmarks
This CL adds benchmarks for the following PackageManager APIs:
* getInstalledApplications
* getInstalledPackages
* getPackageInfo
* getApplicationInfo
* getResourcesForApplication
* getActivityInfo

Bug: 140743821
Change-Id: I467e4264a5e8f5c1c34194c7ad4b4c415387da9e
2019-09-10 09:46:08 -07:00
Eric Holk
aec05a2cdd Initial system server benchmark activity
This adds a simple activity to the Startop Test App for non-scientific
interactive benchmark running for system_server APIs.

Bug: 140743821
Change-Id: I5485152bde4a791035c71d7b3f23e8cff9649292
2019-09-09 15:53:29 -07:00
Jeongik Cha
a1bf8a9b75 Add platform_apis in Android.bp
platform_apis must be true when sdk_version is empty.
So add platform_apis into file that is not included it.

Bug: 132780927
Test: m
Change-Id: Ie7badd61248bbabaf51ef8fb30bdd832af88da15
2019-07-11 15:40:04 +09:00
Carmen Jackson
8be08e5679 Add textview and framelayout inflation cases, refactor.
This change adds a base activity to inflate views, and then adds two
more views to inflate: one with 1000 TextViews and the other with 1000
FrameLayouts in a LinearLayout nested inside a ScrollView.

This change also adds launcher icons for each of the new cases for
ease in testing a launcher-based start.

Bug: 132721345
Test: Verified that the layout segments appear in traces as expected.

Change-Id: Id8c3e867a1ad5df5c3322ce5d69c9b4255042b69
2019-06-26 18:59:09 -07:00
Eric Holk
e6e17c734a [startop] Add an app for testing startup performance
This CL includes a simple app for testing aspects of startup performance. It
will probably gain new activities as we focus on different parts in
particular. Currently it has an empty activity and an activity that focuses on
layout inflation.

Test: mma, adb install, adb shell start (see README.md for exact commands)
Change-Id: I4e98994f0c25ce61a89d13f86eda2320a1fdcafa
2019-06-18 15:41:11 -07:00