Commit Graph

13 Commits

Author SHA1 Message Date
Yan Wang
ab89ecbc82 startop: Fix comments in gerrit CL 9172239.
Test: pytest
Change-Id: I706730c8d54e575e26ff0e2bdbb668d2e70a5c2e
2019-09-03 11:18:15 -07:00
Yan Wang
2ae4f03578 startop: Change trace duration in compiler.py to timedelta.
The time in timestamp is second, while the trace duration is
millisecond. Using timedelta to fix this ambiguity.

Test: pytest compiler_test.py
Change-Id: I6c445c3dac1b60aec77ead14df021b8a2dda7b5e
2019-08-08 18:34:36 -07:00
Yan Wang
6ddab32f68 startop: Add support for trace duration.
Test: pytest app_startup/
Bug: 138233470
Change-Id: Ic8e99b369d3385015d7c86624a61bb6d5e8fdc70
2019-07-31 14:38:40 -07:00
Yan Wang
59aab11f09 startop: Rewrite the perfetto trace collection part.
Test: pytest perfetto_trace_collector_test.py
Bug: 138233615
Change-Id: If13d895029e734a5e52bed73c5f870bb3f036c2f
2019-07-30 19:04:20 -07:00
Yan Wang
06f54882c0 startop: Refactor app running.
Collecting and app running share lots of common code.
Create a new class to run app and allow callbacks to specify
preprocess and postprocess and metrics selection.

Test: pytest run_app_with_prefetch_test.py
Test: pytest app_runner_test.py
Bug: 138233615
Change-Id: I972c82fb9ff3a0f6cc7661bc3dc47b342716c26c
2019-07-30 15:55:18 -07:00
Yan Wang
7af0155c41 startop: Rewrite app startup runner to use new python run_app_with_prefetch.
Test: pytest app_startup_runner_test.py
Test: pytest lib/args_utils_test.py
Test: pytest lib/data_frame_test.py
Test: ./app_startup_runner.py  --package com.google.android.music --readahead fadvise --readahead cold   --inodes textcache  --output output.txt -d -lc 3
Change-Id: Ide9abe4ff3d7179e6830a7866b0eb90cc67d8e40
Bug: 137216480
2019-07-11 11:40:04 -07:00
Yan Wang
3fb2816c59 startop: Rewrite metrics parsing using python.
Shell version metrics parser generates some strange results when called
from Python.

Test: pytest logcat_utils_test.py
Test: pytest adb_utils_test.py
Test: pytest run_app_with_prefetch_test.py
Change-Id: I44a464f7e87f35ecc283c5108577eb33ad394fc6
2019-07-10 16:57:19 -07:00
Yan Wang
34e2dabcf9 startop: Move compiled trace file installation after activity checking (bugfix).
Test: pytest run_app_with_prefetch_test.py
Test: python run_app_with_prefetch.py -p com.android.settings  -i input -d -r fadvise

Bug: 135286022
Change-Id: I06040bb10bfd8edf3f520576c4aed5a28587b142
2019-07-10 16:53:47 -07:00
Yan Wang
fb9bdd8da3 startop: Rewrite the run app bash script to python.
Test: python run_app_with_prefetch.py  -p com.android.settings -a com.android.settings.Settings -r fadvise -i input --debug --simulate
Test: python run_app_with_prefetch.py  -p com.android.settings -a com.android.settings.Settings -r fadvise -i input
Test: pytest run_app_with_prefetch_test.py

Bug: 135286022
Change-Id: I761e5d20292febcb47b7ca9f87d6847d77250f68
2019-06-27 14:07:03 -07:00
Igor Murashkin
ab37e6ec2d startop: Parse camera metrics from logcat for app_startup_runner
Parse ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED_ms,ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED_ms
from logcat when running Camera app.

Also updates the scripts to support multiple metrics output (previously
only one allowed). Adding future per-app metrics is also possible by
just adding 1 file with 1 function call with a regex pattern.

Bug: 132649131
Change-Id: Ibfc620bb156f733b69faa7654b06ef35f1a34de3
2019-06-10 22:20:16 +00:00
Igor Murashkin
7ab5c4d6e6 startop: Update app_startup_runner to work with iorapd
Script measures app startup times with/without iorapd-based
prefetching against a cold (or warm) baseline.

mlock/fadvise readahead options now use iorapd to exercise
real code to do prefetching.

Bug: 72170747
Change-Id: I28affac3470271e46febb0e22a6dc9543258b4a4
2019-04-24 15:24:25 -07:00
Igor Murashkin
973a2dcd6a startop: app_startup script fixes for youtube/chrome
Fix remote_pkill function to work on multiple pids,
this was breaking chrome (which has 3 pids).

Fix activity inference to the "$pkg/$activity"
pattern where previously it could accidentally parse
the wrong token.

Fix app launching to handle activities with '$' in
the name which adb shell treated as a variable.

Test: manual
Change-Id: Ifc9a72f1b9bb5e1416c7602f27f4614efd003849
2018-09-14 16:27:53 -07:00
Igor Murashkin
25f394d681 startop: Add app startup measuring scripts
Test: python3 app_startup_runner_test.py
Change-Id: I4a3d0751ff4e3d74ea2937655cbafa5758e2ee1f
2018-09-11 16:43:22 -07:00