[benchmark] Do three runs
This commit is contained in:
parent
7ecf78aa6c
commit
574c060de0
1 changed files with 8 additions and 6 deletions
|
@ -2,16 +2,17 @@
|
|||
|
||||
set -x
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "$0 host ip"
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "$0 prefix host ip"
|
||||
echo "host and ip of the iperf server"
|
||||
fi
|
||||
|
||||
prefix=$1; shift
|
||||
host=$1; shift
|
||||
port=$1; shift
|
||||
|
||||
flags="-c ${host} -p $port -O 10 -t 190"
|
||||
fbase="iperf"
|
||||
fbase="iperf-${prefix}"
|
||||
|
||||
if echo $host | grep -q ':'; then
|
||||
flags="$flags -6"
|
||||
|
@ -25,10 +26,11 @@ do_benchmark()
|
|||
{
|
||||
full_flags="$@"
|
||||
iperf3_flags=$(echo $full_flags | sed 's/ //g')
|
||||
filename="${fbase}-${iperf3_flags}"
|
||||
|
||||
iperf3 $full_flags | tee "${filename}"
|
||||
|
||||
for run in 1 2 3; do
|
||||
filename="${fbase}${iperf3_flags}-run${run}"
|
||||
iperf3 $full_flags | tee "${filename}"
|
||||
done
|
||||
}
|
||||
|
||||
for p in 1 10 20 50; do
|
||||
|
|
Loading…
Reference in a new issue