You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
824 B

#!/bin/bash
BENCHMARK_SCRIPT="/home/gns3/gns3-bench/gns3-bench.py"
MAX_RUNS=10
TOPO_NAME="bench1"
USERNAME="admin"
PASSWORD="$1"
TIMEOUT=5
function bench_run {
for run in `seq 1 $1` ; do
echo -e "\e[33mbechmark run: $run\e[39m"
until $BENCHMARK_SCRIPT $2 $3 $4 $5 $6 ; do
echo -e "\e[31mrun failed... retrying run: $run...\e[39m"
done
echo -e "\e[32mrun: $run finished\e[39m"
time top -b -n 1 | head -10
done
}
for number_of_concurrent_sims in `seq 1 7`; do
echo -e "\e[35mstarting bechmark with number_of_concurrent_sims: $number_of_concurrent_sims ($MAX_RUNS runs)\e[39m"
bench_run $MAX_RUNS $TOPO_NAME $number_of_concurrent_sims $USERNAME $PASSWORD $TIMEOUT
done
#bench_run 10 bench1 1 admin PASSWORD 5
#bench_run 10 bench1 2 admin PASSWORD 5
#bench_run 10 bench1 3 admin PASSWORD 5