Update Makefile

This commit is contained in:
Quentin 2019-09-04 10:01:00 +02:00
parent f834aa62a3
commit 67fb4a745e
2 changed files with 12 additions and 7 deletions

View file

@ -1,8 +1,9 @@
tor_bw_small: tor_bw_small:
./run-3 \ ./run-3 \
1 . \ 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 . \ 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 tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple
tor_bw_finale: tor_bw_finale:
@ -10,4 +11,5 @@ tor_bw_finale:
10 . \ 10 . \
orig-client 600 1000 100, orig-client 6000 100 100, orig-client 60000 10 100, orig-client 600000 1 100 . \ 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 . \ 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 tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple, tor3 -f /etc/torrc_simple

View file

@ -11,25 +11,28 @@ WAITFOR=2280 # 38min
OLD_IFS=$IFS; IFS="." OLD_IFS=$IFS; IFS="."
read -a PARTS <<< "$@" read -a PARTS <<< "$@"
IFS=$OLD_IFS 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 # EXTRACT DATA
OLD_IFS=$IFS; IFS="," OLD_IFS=$IFS; IFS=","
read -a CONFIG <<< "${PARTS[0]}" read -a CONFIG <<< "${PARTS[0]}"
read -a CLIENT_TARGETS <<< "${PARTS[1]}" read -a CLIENT_TARGETS <<< "${PARTS[1]}"
read -a SERVER_TARGETS <<< "${PARTS[2]}" 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 IFS=$OLD_IFS
[[ ${#CLIENT_TARGETS[@]} == ${#SERVER_TARGETS[@]} ]] \ [[ ${#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[@]} instances=${#CLIENT_TARGETS[@]}
REPEAT=${CONFIG[0]} REPEAT=${CONFIG[0]}
echo ":: Configuration Summary" echo ":: Configuration Summary"
echo "repeat=$REPEAT" echo "repeat=$REPEAT"
for i in $(seq 0 $(expr $instances - 1)); do 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 done
echo ":: Clear Resources" echo ":: Clear Resources"
@ -57,7 +60,7 @@ docker run \
-e HOME='/tmp' \ -e HOME='/tmp' \
-v `pwd`/out:/home/donar \ -v `pwd`/out:/home/donar \
registry.gitlab.inria.fr/qdufour/donar \ registry.gitlab.inria.fr/qdufour/donar \
${TOR_DAEMON[$i]} ${TOR_DAEMON_SERVER[$i]}
docker run \ docker run \
--rm \ --rm \
@ -66,7 +69,7 @@ docker run \
-e HOME='/tmp' \ -e HOME='/tmp' \
-v `pwd`/out:/home/donar \ -v `pwd`/out:/home/donar \
registry.gitlab.inria.fr/qdufour/donar \ registry.gitlab.inria.fr/qdufour/donar \
${TOR_DAEMON[$i]} ${TOR_DAEMON_CLIENT[$i]}
done done