1*d57664e9SAndroid Build Coastguard WorkerThis directory contains a simple Android app that is meant to help in doing 2*d57664e9SAndroid Build Coastguard Workercontrolled startup performance experiments. 3*d57664e9SAndroid Build Coastguard Worker 4*d57664e9SAndroid Build Coastguard WorkerThis app is structured as a number of activities that each are useful for a 5*d57664e9SAndroid Build Coastguard Workerdifferent aspect of startup testing. 6*d57664e9SAndroid Build Coastguard Worker 7*d57664e9SAndroid Build Coastguard Worker# Activities 8*d57664e9SAndroid Build Coastguard Worker 9*d57664e9SAndroid Build Coastguard Worker## EmptyActivity 10*d57664e9SAndroid Build Coastguard Worker 11*d57664e9SAndroid Build Coastguard WorkerThis is the simplest possible Android activity. Starting this exercises only the 12*d57664e9SAndroid Build Coastguard Workersystem parts of startup without any app-specific behavior. 13*d57664e9SAndroid Build Coastguard Worker 14*d57664e9SAndroid Build Coastguard Worker adb shell am start -n com.android.startop.test/.EmptyActivity 15*d57664e9SAndroid Build Coastguard Worker 16*d57664e9SAndroid Build Coastguard Worker## LayoutInflation 17*d57664e9SAndroid Build Coastguard Worker 18*d57664e9SAndroid Build Coastguard WorkerThis activity inflates a reasonably complex layout to see the impact of layout 19*d57664e9SAndroid Build Coastguard Workerinflation. The layout is supported by the viewcompiler, so this can be used for 20*d57664e9SAndroid Build Coastguard Workertesting precompiled layout performance. 21*d57664e9SAndroid Build Coastguard Worker 22*d57664e9SAndroid Build Coastguard WorkerThe activity adds an `inflate#activity_main` slice to atrace around the time 23*d57664e9SAndroid Build Coastguard Workerspent in view inflation to make it easier to focus on the time spent in view 24*d57664e9SAndroid Build Coastguard Workerinflation. 25*d57664e9SAndroid Build Coastguard Worker 26*d57664e9SAndroid Build Coastguard Worker adb shell am start -n com.android.startop.test/.ComplexLayoutInflationActivity 27*d57664e9SAndroid Build Coastguard Worker 28*d57664e9SAndroid Build Coastguard Worker## NonInteractiveSystemServerBenchmark 29*d57664e9SAndroid Build Coastguard Worker 30*d57664e9SAndroid Build Coastguard WorkerThis activity is for running microbenchmarks from the command line. Run as follows: 31*d57664e9SAndroid Build Coastguard Worker 32*d57664e9SAndroid Build Coastguard Worker adb shell am start -W -n com.android.startop.test .NonInteractiveSystemServerBenchmarkActivity 33*d57664e9SAndroid Build Coastguard Worker 34*d57664e9SAndroid Build Coastguard WorkerIt takes awhile (and there's currently no automated way to make sure it's done), 35*d57664e9SAndroid Build Coastguard Workerbut when it finishes, you can get the results like this: 36*d57664e9SAndroid Build Coastguard Worker 37*d57664e9SAndroid Build Coastguard Worker adb shell cat /sdcard/Android/data/com.android.startop.test/files/benchmark.csv 38