diff --git a/scripts/Makefile b/scripts/Makefile index 29b5e13..f68ca36 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,8 +1,9 @@ tor_bw_small: ./run-3 \ 1 . \ - orig-client 600 1000 100, orig-client 6000 100 100, orig-client 60000 10 100, orig-client 600000 1 100 . \ + orig-client 60 1000 100, orig-client 600 100 100, orig-client 6000 10 100, orig-client 60000 1 100 . \ orig-server, orig-server, orig-server, orig-server . \ + tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple . \ tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple tor_bw_finale: @@ -10,4 +11,5 @@ tor_bw_finale: 10 . \ orig-client 600 1000 100, orig-client 6000 100 100, orig-client 60000 10 100, orig-client 600000 1 100 . \ orig-server, orig-server, orig-server, orig-server . \ + tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple . \ tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple diff --git a/scripts/run-3 b/scripts/run-3 index dbde9a0..260a1ab 100755 --- a/scripts/run-3 +++ b/scripts/run-3 @@ -11,25 +11,28 @@ WAITFOR=2280 # 38min OLD_IFS=$IFS; IFS="." read -a PARTS <<< "$@" IFS=$OLD_IFS -[[ ${#PARTS[@]} == 4 ]] || die "Separate count, clients, servers experiments and tor daemon command by dots. I expect 4 parts but got ${#PARTS[@]}" +[[ ${#PARTS[@]} == 5 ]] || die "Separate count, clients, servers experiments and tor daemon command by dots. I expect 5 parts but got ${#PARTS[@]}" # EXTRACT DATA OLD_IFS=$IFS; IFS="," read -a CONFIG <<< "${PARTS[0]}" read -a CLIENT_TARGETS <<< "${PARTS[1]}" read -a SERVER_TARGETS <<< "${PARTS[2]}" -read -a TOR_DAEMON <<< "${PARTS[3]}" +read -a TOR_DAEMON_CLIENT <<< "${PARTS[3]}" +read -a TOR_DAEMON_SERVER <<< "${PARTS[4]}" IFS=$OLD_IFS [[ ${#CLIENT_TARGETS[@]} == ${#SERVER_TARGETS[@]} ]] \ - || die "Same number of experiments is required. Got ${#CLIENT_TARGETS[@]} clients and ${#SERVER_TARGETS[@]} servers" + && [[ ${#SERVER_TARGETS[@]} == ${#TOR_DAEMON_CLIENT[@]} ]] \ + && [[ ${#TOR_DAEMON_CLIENT[@]} == ${#TOR_DAEMON_SERVER[@]} ]] \ + || die "Same number of declaration is required. Got ${#CLIENT_TARGETS[@]} clients, ${#SERVER_TARGETS[@]} servers, ${#TOR_DAEMON_CLIENT[@]} Tor daemon clients and ${#TOR_DAEMON_SERVER[@]} Tor daemon servers" instances=${#CLIENT_TARGETS[@]} REPEAT=${CONFIG[0]} echo ":: Configuration Summary" echo "repeat=$REPEAT" for i in $(seq 0 $(expr $instances - 1)); do - echo " instance=$i - server=${SERVER_TARGETS[$i]} - client=${CLIENT_TARGETS[$i]}" + echo " instance=$i - server=${SERVER_TARGETS[$i]} - client=${CLIENT_TARGETS[$i]} - tor server=${TOR_DAEMON_SERVER[$i]} - tor client=${TOR_DAEMON_CLIENT[$i]}" done echo ":: Clear Resources" @@ -57,7 +60,7 @@ docker run \ -e HOME='/tmp' \ -v `pwd`/out:/home/donar \ registry.gitlab.inria.fr/qdufour/donar \ - ${TOR_DAEMON[$i]} + ${TOR_DAEMON_SERVER[$i]} docker run \ --rm \ @@ -66,7 +69,7 @@ docker run \ -e HOME='/tmp' \ -v `pwd`/out:/home/donar \ registry.gitlab.inria.fr/qdufour/donar \ - ${TOR_DAEMON[$i]} + ${TOR_DAEMON_CLIENT[$i]} done