-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
#!/bin/sh -x | ||
|
||
SAMPLES=3 | ||
|
||
test() { | ||
version=$1 | ||
quicstate=$2 | ||
quicvalue=$3 | ||
quicarg=$4 | ||
kbps=$1 | ||
version=$2 | ||
mode=$3 | ||
quicstate=$4 | ||
quicvalue=$5 | ||
quicarg=$6 | ||
|
||
adb install ~/${version}gh/out/android-arm_qa/cobalt.apk | ||
|
||
#for f in 16 32 128 512 1024 4096 16384 ; do | ||
for f in 00016 00128 01024 16384 ; do | ||
#for f in 00016 00128 01024 16384 ; do | ||
for f in 01024 04096 16384 ; do | ||
echo ${f} | ||
logname=${version}lts_chunk_${f}k_quic_${quicstate} | ||
logname=${version}lts_chunk_${f}k_${kbps}kbps_${mode}_quic_${quicstate} | ||
adb shell am force-stop dev.cobalt.coat | ||
adb shell input keyevent KEYCODE_HOME | ||
sleep 1 | ||
adb shell am start --esa args "--url=http://localhost:8000/xhr.html?chunkSize=${f}\&quic=${quicvalue},--allow_all_cross_origin${quicarg}" dev.cobalt.coat | ||
adb shell am start --esa args "--url=http://localhost:8000/xhr.html?chunksize=${f}\&quic=${quicvalue}\&limitkbps=${kbps}\&mode=${mode},--allow_all_cross_origin${quicarg}" dev.cobalt.coat | ||
sleep 5 # start and stabilize | ||
adb shell 'top -n 10 -d 3 -b -p `pidof dev.cobalt.coat`' | egrep -v --line-buffered "Tasks: | Mem: |Swap: |sirq|^$" | tee ${logname}.log | ||
adb shell 'top -n 5 -d 3 -b -p `pidof dev.cobalt.coat`' | egrep -v --line-buffered "Tasks: | Mem: |Swap: |sirq|^$" | tee ${logname}.log | ||
cat ${logname}.log | egrep dev.cobalt.coat | tr -s " " | cut -d " " -f 9 | awk '{sum+=$1; count+=1} END {print sum/count}' > ${logname}.summary | ||
cat ${logname}.summary | ||
done | ||
|
||
} | ||
|
||
test 25 on 1 | ||
test 25 off 0 ,--disable_quic | ||
test 30000 24 xhr on 1 | ||
test 30000 24 xhr off 0 ,--disable_quic | ||
#test 30000 24 fetch off 0 ,--disable_quic | ||
|
||
test 24 on 1 | ||
test 24 off 0 ,--disable_quic | ||
test 30000 25 xhr on 1 | ||
test 30000 25 xhr off 0 ,--disable_quic | ||
#test 30000 25 fetch off 0 ,--disable_quic |