Merge branch 'master' of gitlab.inria.fr:qdufour/donar

This commit is contained in:
Quentin 2020-02-20 09:18:25 +01:00
commit 01d1b7de34
12 changed files with 269 additions and 98 deletions

View file

@ -896,38 +896,38 @@ jan_battle_light:
jan_dcall_normal: jan_dcall_normal:
./run-3 \ ./run-3 \
32,jan_dcall_normal. \ 32,jan_dcall_normal. \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-dup2-client 2 387, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 387, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 387, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 387, \ dcall-dup2-client 2 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193. \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196. \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-dup2-server 2 387, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 387, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 387, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 387, \ dcall-dup2-server 2 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 234, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 233, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 193. \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 196. \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \
@ -964,38 +964,38 @@ jan_dcall_normal:
jan_dcall_hardened: jan_dcall_hardened:
./run-3 \ ./run-3 \
32,jan_dcall_hardened. \ 32,jan_dcall_hardened. \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-dup2-client 2 396, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 396, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 396, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 396, \ dcall-dup2-client 2 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342. \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331. \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-simple-server 1 396, \ dcall-simple-server 1 360, \
dcall-dup2-server 2 396, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 396, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 396, \ dcall-dup2-server 2 360, \
dcall-dup2-server 2 396, \ dcall-dup2-server 2 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 396, \ dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 360, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342, \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331, \
dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 342. \ dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 331. \
tor3 -f /etc/torrc_guard_2, \ tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \ tor3 -f /etc/torrc_guard_2, \
tor3 -f /etc/torrc_guard_2, \ tor3 -f /etc/torrc_guard_2, \
@ -1032,38 +1032,38 @@ jan_dcall_hardened:
jan_dcall_light: jan_dcall_light:
./run-3 \ ./run-3 \
32,jan_dcall_light. \ 32,jan_dcall_light. \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-simple-client 1 396, \ dcall-simple-client 1 360, \
dcall-dup2-client 2 390, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 390, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 390, \ dcall-dup2-client 2 360, \
dcall-dup2-client 2 390, \ dcall-dup2-client 2 360, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168. \ dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173. \
dcall-simple-server-single 1 396, \ dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 396, \ dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 396, \ dcall-simple-server-single 1 360, \
dcall-simple-server-single 1 396, \ dcall-simple-server-single 1 360, \
dcall-dup2-server-single 2 390, \ dcall-dup2-server-single 2 360, \
dcall-dup2-server-single 2 390, \ dcall-dup2-server-single 2 360, \
dcall-dup2-server-single 2 390, \ dcall-dup2-server-single 2 360, \
dcall-dup2-server-single 2 390, \ dcall-dup2-server-single 2 360, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=1!measlat=0!window=2000 218, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168, \ dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173, \
dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 168. \ dcall-lightning-server-single 12 fast_count=3!tick_tock=0!measlat=0!window=2000 173. \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \
tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12, \

View file

@ -11,7 +11,8 @@ donar \
-r 5000 \ -r 5000 \
> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log & > $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log &
tail -f $4/log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f $3/log/server-donar-stdout.log | grep -q "=== Our 2 requested circuits are now up ===" \
> $3/log/client-measboot-stdout.log 2> $3/log/client-measboot-stderr.log > $3/log/client-measboot-stdout.log 2> $3/log/client-measboot-stderr.log
dcall \ dcall \

View file

@ -11,7 +11,8 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 2 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log
dcall \ dcall \

View file

@ -12,7 +12,8 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 2 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log & > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log &
dcall \ dcall \

View file

@ -12,6 +12,7 @@ donar \
-r 5000 \ -r 5000 \
> $4/log/client-donar-stdout.log 2> $4/log/client-donar-stderr.log & > $4/log/client-donar-stdout.log 2> $4/log/client-donar-stderr.log &
sleep 1
tail -f $4/log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ tail -f $4/log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \
> $4/log/client-measboot-stdout.log 2> $4/log/client-measboot-stderr.log > $4/log/client-measboot-stdout.log 2> $4/log/client-measboot-stderr.log

View file

@ -12,6 +12,7 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log

View file

@ -13,6 +13,7 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log

View file

@ -11,7 +11,8 @@ donar \
-r 5000 \ -r 5000 \
> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log & > $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log &
tail -f $4/log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f $3/log/server-donar-stdout.log | grep -q "=== Our 1 requested circuits are now up ===" \
> $3/log/client-measboot-stdout.log 2> $3/log/client-measboot-stderr.log > $3/log/client-measboot-stdout.log 2> $3/log/client-measboot-stderr.log
dcall \ dcall \

View file

@ -11,7 +11,8 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 1 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log
dcall \ dcall \

View file

@ -11,7 +11,8 @@ donar \
-r 5001 \ -r 5001 \
> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & > ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log &
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 12 requested circuits are now up ===" \ sleep 1
tail -f ../log/server-donar-stdout.log | grep -q "=== Our 1 requested circuits are now up ===" \
> ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log & > ../log/server-measboot-stdout.log 2> ../log/server-measboot-stderr.log &
dcall \ dcall \

153
scripts/gstreamerinspec.py Executable file
View file

@ -0,0 +1,153 @@
#!/usr/bin/python3
import sys,os,functools,re
import datetime
convert = {
"dcall-lightning-server-single": "donar",
"dcall-lightning-server": "donar",
"dcall-dup2-server-single": "torfone",
"dcall-dup2-server": "torfone",
"dcall-simple-server-single": "simple",
"dcall-simple-server": "simple"
}
def extract_info(inf, s):
try:
with open(inf) as f:
full = ''.join(f.readlines())
w = re.search(r'identifier=jan_dcall_(\w+)', full)
if not w: return False
s['current']['mode'] = w.groups()[0]
x = re.search(r'server= (\S+) \d+ ((\S+) (\d+))?', full)
if x:
s['current']['strat'] = convert[x.groups()[0]]
if x.groups()[2] != None:
y = re.search(r'tick_tock=(\d)', x.groups()[2])
if y:
s['current']['strat'] += "-alternate" if y.groups()[0] == '1' else "-double-send"
return True
else:
print("parse error for",inf)
return False
except Exception as e:
print("read error", inf, e)
return False
def categorize(f, s):
return True
def do_new_parse(line, s):
if 'Using buffer of size 160' not in line: return True
try:
current_time = datetime.datetime.strptime(line[:14], "%H:%M:%S.%f")
if 'start' not in s['current']:
s['current']['start'] = current_time
if 'dlvbuf' not in s['current']:
s['current']['dlvbuf'] = 0
if 'delta_list' not in s['current']:
s['current']['delta_list'] = []
s['current']['dlvbuf'] += 1
if 'last' in s['current']:
delta = (current_time - s['current']['last']) / datetime.timedelta(milliseconds=1)
s['current']['delta_list'].append(delta)
#if delta > 1000:
# print('packet',s['current']['dlvbuf'],'has been delivered after',delta,'ms of inactivity')
s['current']['last'] = current_time
except Exception as e:
print(e)
pass
return True
def extract_dcall(f, s):
#s['current']['success_buf'] = 0
#s['current']['failed_buf'] = 0
try:
with open(f) as f:
for line in f:
do_new_parse(line, s)
#time = line.split()[0]
#minutes = int(time.split(':')[1])
#if minutes < 5 or minutes > 10: continue
#if 'Using buffer of size 160' in line:
# s['current']['success_buf'] += 1
#elif 'Using NULL buffer' in line:
# s['current']['failed_buf'] += 1
#print(s['current'])
return True
except Exception as e:
print("read error", f, e)
return False
def aggregate_failed_pct(s):
try:
k = (s['current']['strat'], s['current']['mode'])
if k not in s['failed_5pct']: s['failed_5pct'][k] = 0
if k not in s['failed_1pct']: s['failed_1pct'][k] = 0
s['current']['duration'] = (s['current']['last'] - s['current']['start']) / datetime.timedelta(seconds=1)
s['current']['durmin'] = s['current']['duration'] / 60
expected = s['current']['duration'] * 25
s['current']['expected'] = expected
s['current']['threshold'] = expected * 0.99
s['current']['effective'] = s['current']['dlvbuf'] / s['current']['expected']
s['current']['avg_delta'] = sum(s['current']['delta_list']) / len(s['current']['delta_list'])
print(s['current']['identifier'], k, s['current']['effective'], s['current']['avg_delta'], min(s['current']['delta_list']), max(s['current']['delta_list']))
if s['current']['dlvbuf'] < expected * 0.99:
s['failed_1pct'][k] += 1
# except Exception as e:
# print('err', e)
# pass
#if k not in s['failed_1pct']: s['failed_1pct'][k] = 0
#if s['current']['success_buf'] < 7500 * 0.99:
# s['failed_1pct'][k] += 1
# print(s['current'])
#if k not in s['failed_5pct']: s['failed_5pct'][k] = 0
#if s['current']['success_buf'] < 7500 * 0.95: s['failed_5pct'][k] += 1
#if k not in s['run_per_strat']: s['run_per_strat'][k] = 0
#s['run_per_strat'][k] += 1
except Exception as e:
print(e)
return True
def extract_folder(f, s):
return \
extract_info(f + '/info.txt', s) and \
extract_dcall(f + '/log/server-dcall-gstreamer.log', s) and \
aggregate_failed_pct(s)
def extract(p, s):
item_count = functools.reduce(lambda acc, prev: acc + 1, os.listdir(p), 0)
counter = 0
print("extracting...")
for folder in os.listdir(p):
s['current'] = { 'identifier': folder}
True and \
extract_folder(p + '/' + folder, s) and \
categorize(folder, s) or \
print(f"An error occured with {folder}")
counter += 1
progress = round(counter / item_count * 100)
print(f"{progress}%", end="\r")
print("done")
def output_res(s):
with open('dcall_drop.csv', 'w') as f:
f.write("mode,strat,threshold,ratio\n")
for thr_name, thr_val in [('failed_1pct', 0.01), ('failed_5pct', 0.05)]:
for key,val in s[thr_name].items():
mode, strat = key
ratio = val / s['run_per_strat'][key]
f.write(f"{mode},{strat},{thr_val},{ratio}\n")
state = {'failed_1pct': {}, 'failed_5pct': {}, 'run_per_strat': {}}
extract(sys.argv[1], state)
#output_res(state)

View file

@ -16,6 +16,8 @@ struct dcall_elements {
int remote_port, local_port, latency; int remote_port, local_port, latency;
guint64 grtppktlost; guint64 grtppktlost;
GMainLoop *loop; GMainLoop *loop;
char* buffering_mode;
gboolean droplat;
}; };
int create_rx_chain(struct dcall_elements* de) { int create_rx_chain(struct dcall_elements* de) {
@ -40,8 +42,8 @@ int create_rx_chain(struct dcall_elements* de) {
g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-lost", TRUE, NULL); g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-lost", TRUE, NULL);
g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-retransmission", FALSE, NULL); g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-retransmission", FALSE, NULL);
g_object_set(G_OBJECT (de->rx_jitterbuffer), "latency", de->latency, NULL); g_object_set(G_OBJECT (de->rx_jitterbuffer), "latency", de->latency, NULL);
g_object_set(G_OBJECT (de->rx_jitterbuffer), "drop-on-latency", FALSE, NULL); g_object_set(G_OBJECT (de->rx_jitterbuffer), "drop-on-latency", de->droplat, NULL);
gst_util_set_object_arg(G_OBJECT(de->rx_jitterbuffer), "mode", "buffer"); gst_util_set_object_arg(G_OBJECT(de->rx_jitterbuffer), "mode", de->buffering_mode);
g_object_set(G_OBJECT (de->rx_opusdec), "plc", TRUE, NULL); g_object_set(G_OBJECT (de->rx_opusdec), "plc", TRUE, NULL);
g_object_set(G_OBJECT (de->rx_opusdec), "use-inband-fec", FALSE, NULL); g_object_set(G_OBJECT (de->rx_opusdec), "use-inband-fec", FALSE, NULL);
@ -227,11 +229,13 @@ int main(int argc, char *argv[]) {
.local_port = 5000, .local_port = 5000,
.audio_sink = "pulsesink", .audio_sink = "pulsesink",
.audio_tap = "pulsesrc", .audio_tap = "pulsesrc",
.grtppktlost = 0 .grtppktlost = 0,
.droplat = TRUE,
.buffering_mode = "slave"
}; };
int opt = 0; int opt = 0;
while ((opt = getopt(argc, argv, "t:s:r:p:l:d:a:hb:c:")) != -1) { while ((opt = getopt(argc, argv, "t:s:r:p:l:d:a:hb:c:m:o")) != -1) {
switch(opt) { switch(opt) {
case 'a': case 'a':
de.audio_file = optarg; de.audio_file = optarg;
@ -251,6 +255,11 @@ int main(int argc, char *argv[]) {
case 'p': case 'p':
de.remote_port = atoi(optarg); de.remote_port = atoi(optarg);
break; break;
case 'o':
de.droplat = TRUE;
break;
case 'm':
de.buffering_mode = optarg;
case 'r': case 'r':
de.remote_host = optarg; de.remote_host = optarg;
break; break;