update
Signed-off-by: Wenchao Hao <haowenchao22@gmail.com>
This commit is contained in:
parent
da93ff2b1b
commit
a8443bb0ad
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
import uiautomator2 as u2
|
|
||||||
import time
|
|
||||||
|
|
||||||
def clear_all_apps():
|
|
||||||
d = u2.connect()
|
|
||||||
while True:
|
|
||||||
try:
|
|
||||||
d.keyevent("HOME")
|
|
||||||
d.keyevent("HOME")
|
|
||||||
d.keyevent("312")
|
|
||||||
time.sleep(1)
|
|
||||||
if "com.miui.home:id/recents_container" not in d.dump_hierarchy():
|
|
||||||
continue
|
|
||||||
if "近期没有任何内容" in d.dump_hierarchy():
|
|
||||||
d.keyevent("HOME")
|
|
||||||
d.keyevent("HOME")
|
|
||||||
exit(0)
|
|
||||||
d.xpath('//*[@resource-id="com.miui.home:id/clearAnimView"]').click_exists(timeout=3)
|
|
||||||
d.keyevent("HOME")
|
|
||||||
d.keyevent("HOME")
|
|
||||||
except Exception as e:
|
|
||||||
print("clear_all_apps errors", e)
|
|
||||||
d = u2.connect()
|
|
||||||
continue
|
|
||||||
|
|
||||||
if __name__=="__main__":
|
|
||||||
clear_all_apps()
|
|
||||||
2
run.sh
2
run.sh
|
|
@ -246,7 +246,7 @@ for round in $(seq 1 $cycle); do
|
||||||
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 $nr_inc_direct_reclaim >> $dir/result
|
||||||
|
|
||||||
if [ $clear_background -ne 0 ]; then
|
if [ $clear_background -ne 0 ]; then
|
||||||
python3 clear_apps.py
|
./clearapp.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm tmp.txt
|
rm tmp.txt
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue