parse results
This commit is contained in:
parent
ef17ac5728
commit
ee273f0520
1 changed files with 22 additions and 5 deletions
|
@ -55,15 +55,23 @@ def extract_dcall(f, s):
|
|||
return False
|
||||
|
||||
def aggregate_failed_pct(s):
|
||||
k = s['current']['strat']
|
||||
k = (s['current']['strat'], s['current']['mode'])
|
||||
|
||||
if k not in s['failed_1pct']: s['failed_1pct'][k] = 0
|
||||
if s['current']['success_buf'] < 16500 * 0.99: s['failed_1pct'][k] += 1
|
||||
|
||||
if k not in s['failed_5pct']: s['failed_5pct'][k] = 0
|
||||
if s['current']['success_buf'] < 16500 * 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
|
||||
|
||||
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 \
|
||||
extract_dcall(f + '/log/client-dcall-gstreamer.log', s) and \
|
||||
aggregate_failed_pct(s)
|
||||
|
||||
def extract(p, s):
|
||||
|
@ -82,7 +90,16 @@ def extract(p, s):
|
|||
print(f"{progress}%", end="\r")
|
||||
print("done")
|
||||
|
||||
state = {'failed_1pct': {}}
|
||||
extract(sys.argv[1], state)
|
||||
print(state)
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue