1 Instructions to Run (and modify) app-launcher script 2 ---------------------------------------------------- 3 4 Introduction: app-launcher is a script that launches apps many times, 5 measures various system metrics, computes basic stats for the metrics 6 and reports that stats. 7 8 Launching app-launcher : 9 app-launcher -a|-b|-u [-v] num-iterations 10 -a:Run on all cores 11 -b:Run only big cores 12 -c:pagecached. Don't drop pagecache before each launch (not default) 13 -h:Dump help menu' 14 -u:user experience, no change to cpu/gpu frequencies or governors' 15 -v : Optional, Verbose mode, prints stats on a lot of metrics. 16 num-iterations : Must be >= 100 to get statistically valid data. 17 18 Note, under -a|-b, we lock the CPU and GPU frequencies. 19 20 Apps Supported : 21 On phone, these 4 apps are launched 22 Chrome 23 Camera 24 Maps 25 Youtube 26 27 On Fugu (Google TV), these 3 apps are launched 28 YouTube 29 Games 30 Music 31 32 To add new apps, launch app manually and grep for package name + 33 activity name in logcat and add these to the launch_phone_apps() 34 function. 35 36 Adding support for new Devices to app-launcher : 37 There are a few bits of code needed to do this. 38 1) Add a new cpufreq_<device> routine to fix the CPU/GPU frequencies 39 as desired. 40 2) Add logic that checks the $model obtained and check against your device. 41 (a) Then add code to call your cpufreq_<device> routine there 42 (b) (Optional) Add code to get the /system block device pathname. This is 43 only needed if you wan to get storage block device (/system) data. 44 45 Adding new Metrics to app-launcher : 46 You can modify the way simpleperf is used in the script to collect 47 different metrics, but that will require a change to getstats() to 48 parse the output as necessary. Adding new storage stats or other stats 49 collected from /proc (or /sys) is definitely possible, but code needs 50 to be written for that - modeled after the disk_stats_before/after 51 functions. 52 53 Notes : 54 55 Here are the commands to launch/stop the various Apps of interest. The 56 way to find the package and activity for the app of interest is to 57 launch the app and then grep for it in logcat to find the 58 package+activity and use that in am start. 59 60 Chrome : 61 adb shell 'simpleperf stat -a am start -W -n com.android.chrome/com.google.android.apps.chrome.Main' 62 adb shell 'am force-stop com.android.chrome' 63 64 Camera : 65 adb shell 'simpleperf stat -a am start -W -n com.google.android.GoogleCamera/com.android.camera.CameraActivity' 66 adb shell 'am force-stop com.google.android.GoogleCamera' 67 68 Maps : 69 adb shell 'simpleperf stat -a am start -W -n com.google.android.apps.maps/com.google.android.maps.MapsActivity' 70 adb shell 'am force-stop com.google.android.apps.maps' 71 72 Youtube : 73 adb shell 'am start -W -n com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity' 74 adb shell 'am force-stop com.google.android.youtube' 75 76 77