Fix measurement

This commit is contained in:
Quentin Dufour 2019-03-11 15:48:57 +01:00
parent a6cc0f778e
commit cdf2562f04
2 changed files with 4 additions and 4 deletions

View file

@ -4,5 +4,5 @@ tor -f /etc/torrc > ./log/client-tor-stdout.log 2> ./log/client-tor-stderr.log &
sleep 2
mkdir -p ./shared
HS="`cat ./shared/onion_services.pub | head -n1`.onion"
measlat -h $HS -p 7500 -t tcp > /dev/null 2>&1 # Used to wait for connections
measlat -h $HS -p 7500 -c $1 -i $2 -s $3 > ./res/xp2.csv 2> ./log/client-measlat-stderr.log
measlat -h $HS -p 7500 -t tor # Used to wait for connections
measlat -h $HS -p 7500 -t tor -c $1 -i $2 -s $3 > ./res/xp2.csv 2> ./log/client-measlat-stderr.log

View file

@ -161,9 +161,9 @@ void register_categories(struct evt_core_ctx* evts) {
int register_tor_socket(struct evt_core_ctx* evts, char* host, char* port, int count, int size) {
int socks5_sock = -1, err = 0;
for (int i = 30; i > 0; i--) {
for (int i = 120; i > 0; i--) {
sleep(2);
printf("Try %d/30 to connect to %s:%s\n", i, host, port);
printf("Remaining try %d/120 to connect to %s:%s\n", i, host, port);
if (socks5_sock >= 0) {
close(socks5_sock);
socks5_sock = -1;