• Home
  • History
  • Annotate
  • only in /system/extras/app-launcher/
NameDateSize

..29-Aug-20174 KiB

Android.mk29-Aug-2017644

app-launcher29-Aug-201715.7 KiB

computestats.c29-Aug-20173 KiB

computestatsf.c29-Aug-20173 KiB

README29-Aug-20172.7 KiB

README

1		Instructions to Run (and modify) app-launcher script
2		----------------------------------------------------
3
4Introduction: app-launcher is a script that launches apps many times,
5measures various system metrics, computes basic stats for the metrics
6and reports that stats.
7
8Launching app-launcher :
9app-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.
16num-iterations : Must be >= 100 to get statistically valid data.
17
18Note, under -a|-b, we lock the CPU and GPU frequencies.
19
20Apps Supported :
21On phone, these 4 apps are launched
22Chrome
23Camera
24Maps
25Youtube
26
27On Fugu (Google TV), these 3 apps are launched
28YouTube
29Games
30Music
31
32To add new apps, launch app manually and grep for package name +
33activity name in logcat and add these to the launch_phone_apps()
34function.
35
36Adding support for new Devices to app-launcher :
37There are a few bits of code needed to do this.
381) Add a new cpufreq_<device> routine to fix the CPU/GPU frequencies
39as desired.
402) 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
45Adding new Metrics to app-launcher :
46You can modify the way simpleperf is used in the script to collect
47different metrics, but that will require a change to getstats() to
48parse the output as necessary. Adding new storage stats or other stats
49collected from /proc (or /sys) is definitely possible, but code needs
50to be written for that - modeled after the disk_stats_before/after
51functions.
52
53Notes :
54
55Here are the commands to launch/stop the various Apps of interest. The
56way to find the package and activity for the app of interest is to
57launch the app and then grep for it in logcat to find the
58package+activity and use that in am start.
59
60Chrome :
61adb shell 'simpleperf stat -a am start -W -n com.android.chrome/com.google.android.apps.chrome.Main'
62adb shell 'am force-stop com.android.chrome'
63
64Camera :
65adb shell 'simpleperf stat -a am start -W -n com.google.android.GoogleCamera/com.android.camera.CameraActivity'
66adb shell 'am force-stop com.google.android.GoogleCamera'
67
68Maps :
69adb shell 'simpleperf stat -a am start -W -n com.google.android.apps.maps/com.google.android.maps.MapsActivity'
70adb shell 'am force-stop com.google.android.apps.maps'
71
72Youtube :
73adb shell 'am start -W -n com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity'
74adb shell 'am force-stop com.google.android.youtube'
75
76
77