Skip to content

Commit

Permalink
fix(parser): update CLI log output parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Sep 26, 2023
1 parent 1e29b44 commit 3cc0ef5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions netsim/netsim_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,11 @@ def stats_parser(nodes, prefix):
if node['parser'] == 'iroh_1mb':
f_size = 1024*1024
for line in lines:
if 'Downloading' in line:
is_ok += 1
if 'Transferred' in line and 'in' in line and '/s' in line:
is_ok += 1
reported = parse_humanized_output(line)
reported_time = (f_size*8) / (reported*1000*1000)
if is_ok < 2:
if is_ok == 0:
raise Exception("bad run")
s = parse_time_output(lines, f_size)
s['reported_mbits'] = reported
Expand Down

0 comments on commit 3cc0ef5

Please sign in to comment.