Fix measurement
This commit is contained in:
parent
a6cc0f778e
commit
cdf2562f04
2 changed files with 4 additions and 4 deletions
|
@ -4,5 +4,5 @@ tor -f /etc/torrc > ./log/client-tor-stdout.log 2> ./log/client-tor-stderr.log &
|
||||||
sleep 2
|
sleep 2
|
||||||
mkdir -p ./shared
|
mkdir -p ./shared
|
||||||
HS="`cat ./shared/onion_services.pub | head -n1`.onion"
|
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 -t tor # 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 -c $1 -i $2 -s $3 > ./res/xp2.csv 2> ./log/client-measlat-stderr.log
|
||||||
|
|
|
@ -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 register_tor_socket(struct evt_core_ctx* evts, char* host, char* port, int count, int size) {
|
||||||
int socks5_sock = -1, err = 0;
|
int socks5_sock = -1, err = 0;
|
||||||
for (int i = 30; i > 0; i--) {
|
for (int i = 120; i > 0; i--) {
|
||||||
sleep(2);
|
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) {
|
if (socks5_sock >= 0) {
|
||||||
close(socks5_sock);
|
close(socks5_sock);
|
||||||
socks5_sock = -1;
|
socks5_sock = -1;
|
||||||
|
|
Loading…
Reference in a new issue