• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Android.bpD23-Mar-2024645 4135

READMED23-Mar-20243.2 KiB8870

app-launcherD23-Mar-202422.1 KiB583437

computestats.cD23-Mar-20243 KiB119108

computestatsf.cD23-Mar-20243 KiB119108

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
8Setup:
91) Make sure the device is seen via 'adb devices' and authorize adb via the
10popup dialog.
112) Clear the setup wizard.
123) Login to an android user test account.
134) Clear the first time user dialogs on supported apps for your device (see
14below).
155) Enable wifi and connect to a network (ex. GoogleGuest).
16
17Launching app-launcher :
18app-launcher -a|-b|-u [-c|-v|-s <serial number>] num-iterations
19-a:Run on all cores
20-b:Run only big cores
21-c:pagecached. Don't drop pagecache before each launch (not default)
22-h:Dump help menu'
23-u:user experience, no change to cpu/gpu frequencies or governors'
24-v:Optional, Verbose mode, prints stats on a lot of metrics.
25-s <serial number>:Optional, specify serial number if multiple devices are
26                   attached to host
27num-iterations : Must be >= 100 to get statistically valid data.
28
29Note, under -a|-b, we lock the CPU and GPU frequencies.
30
31Apps Supported :
32On phone, these 4 apps are launched
33Chrome
34Camera
35Maps
36Youtube
37
38On Fugu (Google TV), these 3 apps are launched
39YouTube
40Games
41Music
42
43To add new apps, launch app manually and grep for package name +
44activity name in logcat and add these to the launch_phone_apps()
45function.
46
47Adding support for new Devices to app-launcher :
48There are a few bits of code needed to do this.
491) Add a new cpufreq_<device> routine to fix the CPU/GPU frequencies
50as desired.
512) Add logic that checks the $model obtained and check against your device.
52   (a) Then add code to call your cpufreq_<device> routine there
53   (b) (Optional) Add code to get the /system block device pathname. This is
54   only needed if you wan to get storage block device (/system) data.
55
56Adding new Metrics to app-launcher :
57You can modify the way simpleperf is used in the script to collect
58different metrics, but that will require a change to getstats() to
59parse the output as necessary. Adding new storage stats or other stats
60collected from /proc (or /sys) is definitely possible, but code needs
61to be written for that - modeled after the disk_stats_before/after
62functions.
63
64Notes :
65
66Here are the commands to launch/stop the various Apps of interest. The
67way to find the package and activity for the app of interest is to
68launch the app and then grep for it in logcat to find the
69package+activity and use that in am start.
70
71Chrome :
72adb shell 'simpleperf stat -a am start -W -n com.android.chrome/com.google.android.apps.chrome.Main'
73adb shell 'am force-stop com.android.chrome'
74
75Camera :
76adb shell 'simpleperf stat -a am start -W -n com.google.android.GoogleCamera/com.android.camera.CameraActivity'
77adb shell 'am force-stop com.google.android.GoogleCamera'
78
79Maps :
80adb shell 'simpleperf stat -a am start -W -n com.google.android.apps.maps/com.google.android.maps.MapsActivity'
81adb shell 'am force-stop com.google.android.apps.maps'
82
83Youtube :
84adb shell 'am start -W -n com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivity'
85adb shell 'am force-stop com.google.android.youtube'
86
87
88