diff --git a/run.sh b/run.sh index 90ce619..e07e5a0 100755 --- a/run.sh +++ b/run.sh @@ -1,8 +1,9 @@ #$dirput: round app start_time(ms) start_type rss(MB) pss(MB) ratio pagefault minorfaults majorfaults itlbmiss dtlbmiss cpustalled cycle=3 +wait=3 -while getopts ":s:c" opt +while getopts ":s:c:w" opt do case $opt in s) @@ -11,6 +12,9 @@ do c) cycle=$OPTARG ;; + c) + wait=$OPTARG + ;; ?) echo "unrecognized parameters" $opt echo "usage: run.sh -s sid -c cycle" @@ -112,7 +116,7 @@ for round in $(seq 1 $cycle); do adb shell cat /proc/vmstat > $dir/system_mem/after_vmstat-$app-$round # 睡眠3s后拉simpleperf和perfetto数据 - sleep 10 + sleep $wait adb pull /data/misc/perfetto-traces/trace-"$app"-"$round".ptrace $dir/traces adb pull /data/local/tmp/simpleperf-"$app"-"$round".txt $dir/simpleperf/ adb shell "rm /data/misc/perfetto-traces/trace-"$app"-"$round".ptrace"