summaryrefslogtreecommitdiff
path: root/app-launcher/README
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2017-01-26 11:07:14 -0800
committerMohan Srinivasan <srmohan@google.com>2017-01-26 14:48:32 -0800
commitd5f50d8949b883b619e2acbf2b32bfab1d444189 (patch)
tree35d5cacaa79aeb7da6cc4f2b179325b650add09c /app-launcher/README
parent3e24331d2915d0c582138651b2f4e57eff881bd9 (diff)
downloadextras-d5f50d8949b883b619e2acbf2b32bfab1d444189.tar.gz
app-launcher is a App Launch Perf Analysis tool.
app-launcher is an automated tool that automates the launching of selected Apps (hundreds of times each) and collects system metrics like CPU util, storage device util, launch times, context switches, branch mispredicts etc. This is very useful for A/B compares of system changes in how they impact App Launch. This code was under google_experimental and was used by various members who found it very useful, so moving it under system/extras (under userdebug). Test: I (and others) have used app launcher on multiple occasions over several months. And comparison of metrics reported by app-launcher are consistent with metrics reported by other tools, for these tests. Change-Id: I8b469b4165035a958b155cfffc93341cddcc444c Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'app-launcher/README')
-rw-r--r--app-launcher/README76
1 files changed, 76 insertions, 0 deletions
diff --git a/app-launcher/README b/app-launcher/README
new file mode 100644
index 00000000..cca58aa5
--- /dev/null
+++ b/app-launcher/README
@@ -0,0 +1,76 @@
+ Instructions to Run (and modify) app-launcher script
+ ----------------------------------------------------
+
+Introduction: app-launcher is a script that launches apps many times,
+measures various system metrics, computes basic stats for the metrics
+and reports that stats.
+
+Launching app-launcher :
+app-launcher -a|-b|-u [-v] num-iterations
+-a:Run on all cores
+-b:Run only big cores
+-c:pagecached. Don't drop pagecache before each launch (not default)
+-h:Dump help menu'
+-u:user experience, no change to cpu/gpu frequencies or governors'
+-v : Optional, Verbose mode, prints stats on a lot of metrics.
+num-iterations : Must be >= 100 to get statistically valid data.
+
+Note, under -a|-b, we lock the CPU and GPU frequencies.
+
+Apps Supported :
+On phone, these 4 apps are launched
+Chrome
+Camera
+Maps
+Youtube
+
+On Fugu (Google TV), these 3 apps are launched
+YouTube
+Games
+Music
+
+To add new apps, launch app manually and grep for package name +
+activity name in logcat and add these to the launch_phone_apps()
+function.
+
+Adding support for new Devices to app-launcher :
+There are a few bits of code needed to do this.
+1) Add a new cpufreq_<device> routine to fix the CPU/GPU frequencies
+as desired.
+2) Add logic that checks the $model obtained and check against your device.
+ (a) Then add code to call your cpufreq_<device> routine there
+ (b) (Optional) Add code to get the /system block device pathname. This is
+ only needed if you wan to get storage block device (/system) data.
+
+Adding new Metrics to app-launcher :
+You can modify the way simpleperf is used in the script to collect
+different metrics, but that will require a change to getstats() to
+parse the output as necessary. Adding new storage stats or other stats
+collected from /proc (or /sys) is definitely possible, but code needs
+to be written for that - modeled after the disk_stats_before/after
+functions.
+
+Notes :
+
+Here are the commands to launch/stop the various Apps of interest. The
+way to find the package and activity for the app of interest is to
+launch the app and then grep for it in logcat to find the
+package+activity and use that in am start.
+
+Chrome :
+adb shell 'simpleperf stat -a am start -W -n com.android.chrome/com.google.android.apps.chrome.Main'
+adb shell 'am force-stop com.android.chrome'
+
+Camera :
+adb shell 'simpleperf stat -a am start -W -n com.google.android.GoogleCamera/com.android.camera.CameraActivity'
+adb shell 'am force-stop com.google.android.GoogleCamera'
+
+Maps :
+adb shell 'simpleperf stat -a am start -W -n com.google.android.apps.maps/com.google.android.maps.MapsActivity'
+adb shell 'am force-stop com.google.android.apps.maps'
+
+Youtube :
+adb shell 'am start -W -n com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity'
+adb shell 'am force-stop com.google.android.youtube'
+
+