Skip to content

Commit

Permalink
Update the collection script too
Browse files Browse the repository at this point in the history
  • Loading branch information
kaidokert committed Aug 8, 2024
1 parent 358e04c commit a872edc
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions collect.sh
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

0 comments on commit a872edc

Please sign in to comment.