summaryrefslogtreecommitdiff
path: root/simpleperf/scripts/app_profiler.config
diff options
context:
space:
mode:
Diffstat (limited to 'simpleperf/scripts/app_profiler.config')
-rw-r--r--simpleperf/scripts/app_profiler.config18
1 files changed, 10 insertions, 8 deletions
diff --git a/simpleperf/scripts/app_profiler.config b/simpleperf/scripts/app_profiler.config
index f3aebded..4b61edbe 100644
--- a/simpleperf/scripts/app_profiler.config
+++ b/simpleperf/scripts/app_profiler.config
@@ -34,16 +34,18 @@ apk_file_path = ""
recompile_app = True
-# Set to true if we want to restart the app before profiling. Otherwise, set to False.
-restart_app = True
+# If launch_activity is specified, we use `am start -n [app_package_name]/[launch_activity]` to start the app.
+launch_activity = '.MainActivity'
+# If launch_activity is not set, and launch_inst_test is, we launch an instrumentation test:
+# `am instrument -e class [launch_inst_test] [app_package_name]/android.support.test.runner.AndroidJUnitRunner`
+# Generally, will be of the form 'com.example.MyTestClass#myTestMethod'
+launch_inst_test = ''
-if recompile_app and not restart_app:
- raise Exception('[restart_app] is needed for [recompile_app] to take effect.')
-
-# We use `am start -n [app_package_name]/[main_activity]` to start the app.
-main_activity = '.MainActivity'
+if recompile_app and not launch_activity and not launch_inst_test:
+ raise Exception('one of [launch_activity or launch_inst_test] is'
+ + 'needed for [recompile_app] to take effect.')
# Profiling record options that will be passed directly to `simpleperf record` command on device.
@@ -66,4 +68,4 @@ readelf_path = "readelf"
# binary_cache_dir is used to cache binaries pulled from device. To report precisely, we pull each
# binary hit by perf.data on host.
-binary_cache_dir = "binary_cache" \ No newline at end of file
+binary_cache_dir = "binary_cache"