Browse Source

add benchmark script

master
Nico Schottelius 3 years ago
parent
commit
b354a2479b
  1. 37
      bin/run-benchmark.sh

37
bin/run-benchmark.sh

@ -0,0 +1,37 @@
#!/bin/sh
set -x
if [ $# -ne 2 ]; then
echo "$0 host ip"
echo "host and ip of the iperf server"
fi
host=$1; shift
port=$1; shift
flags="-p $port -O 10 -t 190"
fbase="iperf-to-${host}"
if echo $host | grep -q ':'; then
flags="$flags -6"
fbase="${fbase}-from-v6"
else
flags="$flags -4"
fbase="${fbase}-from-v4"
fi
do_benchmark()
{
full_flags="$@"
iperf3_flags=$(echo $flags | sed 's/ //g')
filename="${fbase}-${iperf3_flags}"
iperf3 $flags -P$p | tee "${filename}"
}
for p in 1 10 20 50; do
do_benchmark $flags -P$p
do_benchmark $flags -P$p -u -b0
done
Loading…
Cancel
Save