Compare commits
No commits in common. "eaa21b20af7343e4bd8ce1c07fb40690562cf0da" and "f2039d631c12cfc1595a33f4766ede076a726877" have entirely different histories.
eaa21b20af
...
f2039d631c
27
applist
27
applist
|
|
@ -1,13 +1,40 @@
|
|||
tv.danmaku.bili
|
||||
com.xingin.xhs
|
||||
com.jingdong.app.mall
|
||||
com.taobao.taobao
|
||||
com.xunmeng.pinduoduo
|
||||
com.ss.android.article.news
|
||||
com.sina.weibo
|
||||
com.tencent.mobileqq
|
||||
com.tencent.qqlive
|
||||
com.smile.gifmaker
|
||||
com.netease.cloudmusic
|
||||
air.tv.douyu.android
|
||||
com.autonavi.minimap
|
||||
com.sankuai.meituan
|
||||
com.tencent.mm
|
||||
com.eg.android.AlipayGphone
|
||||
com.ss.android.ugc.aweme.lite
|
||||
com.kuaishou.nebula
|
||||
com.sup.android.superb
|
||||
com.baidu.searchbox
|
||||
com.tencent.weread
|
||||
com.tencent.tmgp.sgame
|
||||
com.qiyi.video
|
||||
com.UCMobile
|
||||
com.ss.android.ugc.aweme
|
||||
com.taobao.idlefish
|
||||
com.happyelements.AndroidAnimal
|
||||
com.android.deskclock
|
||||
com.tencent.qqmusic
|
||||
com.android.camera
|
||||
com.tencent.mtt
|
||||
com.dragon.read
|
||||
com.baidu.tieba
|
||||
com.miHoYo.Yuanshen
|
||||
com.quark.browser
|
||||
com.tencent.tmgp.pubgmhd
|
||||
com.tencent.jkchess
|
||||
com.kmxs.reader
|
||||
com.ss.android.article.lite
|
||||
com.duowan.kiwi
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ def clear_all_apps():
|
|||
try:
|
||||
d.keyevent("HOME")
|
||||
d.keyevent("HOME")
|
||||
d.keyevent("312")
|
||||
d.keyevent("MENU")
|
||||
time.sleep(1)
|
||||
if "com.miui.home:id/recents_container" not in d.dump_hierarchy():
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -98,5 +98,5 @@ data_sources: {
|
|||
}
|
||||
}
|
||||
}
|
||||
duration_ms: 20000
|
||||
duration_ms: 8000
|
||||
|
||||
|
|
|
|||
52
run.sh
52
run.sh
|
|
@ -5,7 +5,7 @@ wait=3
|
|||
clear_background=0
|
||||
mthp_stat=0
|
||||
|
||||
while getopts ":s:c:w:h:kT" opt
|
||||
while getopts ":s:c:w:h:C:T" opt
|
||||
do
|
||||
case $opt in
|
||||
s)
|
||||
|
|
@ -14,7 +14,7 @@ do
|
|||
c)
|
||||
cycle=$OPTARG
|
||||
;;
|
||||
k)
|
||||
C)
|
||||
clear_background=1
|
||||
;;
|
||||
w)
|
||||
|
|
@ -33,7 +33,7 @@ do
|
|||
echo "-s: specify serial id of device"
|
||||
echo "-c: specify applist startup cycle"
|
||||
echo "-w: specify wait time after app start, before start next app, default 10 s"
|
||||
echo "-k: if to kill all background apps before start app"
|
||||
echo "-C: if to kill all background apps before start app"
|
||||
echo "-T: if check app's mTHP status"
|
||||
exit 1
|
||||
;;
|
||||
|
|
@ -68,42 +68,9 @@ mkdir $dir/meminfo
|
|||
mkdir $dir/simpleperf
|
||||
mkdir $dir/thpmaps
|
||||
|
||||
echo "round app start_type start_time rss pss pagefaults minorfaults majorfaults itlbmiss dtlbmiss cpustall inc_ratio order4_ratio order4_cont inc_total nr_direct_reclaim" > $dir/result
|
||||
echo "round app start_type start_time rss pss pagefaults minorfaults majorfaults itlbmiss dtlbmiss cpustall inc_ratio order4_ratio order4_cont inc_total" > $dir/result
|
||||
|
||||
for round in $(seq 1 $cycle); do
|
||||
# 重启并等待重启完成
|
||||
echo "rebooting"
|
||||
adb reboot
|
||||
sleep 30
|
||||
|
||||
# 重启后等待adb
|
||||
# 如果10min还未成功则判断失败
|
||||
for w in $(seq 1 600); do
|
||||
if [ $(adb devices | grep $ANDROID_SERIAL -c) -eq 0 ]; then
|
||||
echo waiting device $w
|
||||
sleep 1
|
||||
continue
|
||||
fi
|
||||
adb root
|
||||
break
|
||||
done
|
||||
|
||||
# adb连接后睡眠60s
|
||||
sleep 60
|
||||
|
||||
# 解锁手机
|
||||
~/.scripts/android/unlock.sh
|
||||
# 等待降温
|
||||
for f in $(seq 1 900); do
|
||||
temp=$(adb shell dumpsys battery | grep temperature | awk '{print $2}')
|
||||
if [ $temp -gt 300 ]; then
|
||||
echo [$f] now temperature is $temp
|
||||
sleep 1
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
for app in `cat applist`; do
|
||||
sleep 3
|
||||
|
||||
|
|
@ -125,10 +92,6 @@ for round in $(seq 1 $cycle); do
|
|||
activity="com.qiyi.video/com.qiyi.video.WelcomeActivity"
|
||||
elif [ "$app" == "com.netease.cloudmusic" ]; then
|
||||
activity="com.netease.cloudmusic/com.netease.cloudmusic.activity.IconChangeDefaultAlias"
|
||||
elif [ "$app" == "com.ss.android.ugc.aweme" ]; then
|
||||
activity="com.ss.android.ugc.aweme/com.ss.android.ugc.aweme.splash.SplashActivity"
|
||||
elif [ "$app" == "com.ss.android.ugc.aweme.lite" ]; then
|
||||
activity="com.ss.android.ugc.aweme.lite/com.ss.android.ugc.aweme.splash.SplashActivity"
|
||||
else
|
||||
activity=$(adb shell dumpsys package $app | grep -A 1 -w "android.intent.action.MAIN:" | head -n 2 | tail -n 1 | awk '{print $2}')
|
||||
fi
|
||||
|
|
@ -235,12 +198,7 @@ for round in $(seq 1 $cycle); do
|
|||
minorfaults=$(cat $dir/simpleperf/simpleperf-"$app"-"$round".txt | grep 'minor-faults' | awk '{print $1}' | sed s/,//)
|
||||
majorfaults=$(cat $dir/simpleperf/simpleperf-"$app"-"$round".txt | grep 'major-faults' | awk '{print $1}' | sed s/,//)
|
||||
|
||||
# 计算直接内存回收次数
|
||||
nr_init_direct_reclaim=$(cat $dir/system_mem/after_vmstat-$app-$round | grep pgscan_direct_throttle | awk '{print $2}')
|
||||
nr_direct_reclaim=$(cat $dir/system_mem/before_vmstat-$app-$round | grep pgscan_direct_throttle | awk '{print $2}')
|
||||
nr_inc_direct_reclaim=$((nr_direct_reclaim-nr_init_direct_reclaim))
|
||||
|
||||
echo $round $app $start_type $start_time $rss $pss $pagefaults $minorfaults $majorfaults $itlbmiss $dtlbmiss $cpustall $inc_ratio $inc_total $order4_ratio $order4_cont $nr_inc_direct_reclaim >> $dir/result
|
||||
echo $round $app $start_type $start_time $rss $pss $pagefaults $minorfaults $majorfaults $itlbmiss $dtlbmiss $cpustall $inc_ratio $inc_total $order4_ratio $order4_cont>> $dir/result
|
||||
|
||||
if [ $clear_background -ne 0 ]; then
|
||||
python3 clear_apps.py
|
||||
|
|
|
|||
Loading…
Reference in New Issue