Signed-off-by: Wenchao Hao <haowenchao22@gmail.com>
This commit is contained in:
Wenchao Hao 2025-05-15 16:09:34 +08:00
parent fa3d340e5a
commit 7da80ec9de
1 changed files with 13 additions and 3 deletions

View File

@ -2,6 +2,8 @@ app=$1
round=$2 round=$2
dir=$3 dir=$3
# iqiyi com.qiyi.video/com.qiyi.video.WelcomeActivity
prev_alloc=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_alloc) prev_alloc=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_alloc)
prev_alloc_fallback=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_fallback) prev_alloc_fallback=$(adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/anon_fault_fallback)
@ -13,16 +15,24 @@ echo perfetto_pid is $perfetto_pid
# 启动应用 # 启动应用
sleep 1 sleep 1
if [ "$app" == "com.qiyi.video" ]; then
elif [ "$app" == "com.netease.cloudmusic" ]; then
activity="com.qiyi.video/.WelcomeActivityBirthday"
else
activity="com.netease.cloudmusic/com.netease.cloudmusic.activity.IconChangeDefaultAlias"
else
activity=$(adb shell dumpsys package $app | grep -A 1 -w "android.intent.action.MAIN:" | head -n 2 | tail -n 1 | awk '{print $2}') activity=$(adb shell dumpsys package $app | grep -A 1 -w "android.intent.action.MAIN:" | head -n 2 | tail -n 1 | awk '{print $2}')
fi
if [ -z "$activity" ]; then if [ -z "$activity" ]; then
continue continue
fi fi
echo "starting $app" echo "starting $activity"
adb shell am start -n $activity adb shell am start -n $activity
# 睡眠15s等待perfetto退出 # 睡眠15s等待perfetto退出
sleep 12 sleep 12
wait wait
# 后面的dumpsys meminfo也会分配大页 # 后面的dumpsys meminfo也会分配大页