Rework scripts

This commit is contained in:
Quentin 2019-09-02 16:35:01 +02:00
parent 1cb7203802
commit e1e35e159b
4 changed files with 21 additions and 9 deletions

6
scripts/Makefile Normal file
View file

@ -0,0 +1,6 @@
tor_bw_small:
./run-3 \
1 . \
orig-client 1000 1000 100, orig-client 1000 100 100, orig-client 10000 10 100, 10000 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

View file

@ -1,8 +1,13 @@
#!/bin/bash
mkdir -p $4/{log,shared,res}
donar -a dup2 -c -o $4/shared/onion_services.pub -r 9000 > $4/log/client-donar-stdout.log 2> $4/log/client-donar-stderr.log &
mkdir -p $5/{log,shared,res}
donar \
-a dup2 \
-c \
-o $5/shared/onion_services.pub \
-l $4
-r 9000 \
> $5/log/client-donar-stdout.log 2> $5/log/client-donar-stderr.log &
sleep 2
measlat -h 127.13.3.7 -p 9000 > /dev/null 2>&1 # Used to wait for connections
dump_circuits > $4/log/circuits.txt
measlat -h 127.13.3.7 -p 9000 -c $1 -i $2 -s $3 > $4/res/dup2.csv 2> $4/log/client-measlat-stderr.log
measlat -h 127.13.3.7 -p 9000 -c $1 -i $2 -s $3 > $5/res/dup2.csv 2> $5/log/client-measlat-stderr.log

View file

@ -1,6 +1,6 @@
#!/bin/bash
mkdir -p $1/{log,shared}
cd $1/shared
mkdir -p $2/{log,shared}
cd $2/shared
donar -a dup2 -s -e 9000 > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
donar -a dup2 -s -l $1 -e 9000 > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
udpecho -p 9000 > ../log/server-udpecho-stdout.log 2> ../log/server-udpecho-stderr.log

View file

@ -18,6 +18,7 @@ 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]}"
IFS=$OLD_IFS
[[ ${#CLIENT_TARGETS[@]} == ${#SERVER_TARGETS[@]} ]] \
@ -56,7 +57,7 @@ docker run \
-e HOME='/tmp' \
-v `pwd`/out:/home/donar \
registry.gitlab.inria.fr/qdufour/donar \
tor -f /etc/torrc
${TOR_DAEMON[$i]}
docker run \
--rm \
@ -65,7 +66,7 @@ docker run \
-e HOME='/tmp' \
-v `pwd`/out:/home/donar \
registry.gitlab.inria.fr/qdufour/donar \
tor -f /etc/torrc
${TOR_DAEMON[$i]}
done