Add a second script
This commit is contained in:
parent
dc6bdaa9de
commit
97c78438b0
1 changed files with 15 additions and 0 deletions
15
scripts/drop_burst_parse.py
Executable file
15
scripts/drop_burst_parse.py
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import sys,re,math
|
||||
|
||||
prev = 0
|
||||
|
||||
for line in sys.stdin:
|
||||
res = re.match(r".*Packet (\d+) latency.*", line)
|
||||
if not res: continue
|
||||
pkt_id, = res.groups()
|
||||
pkt_id = int(pkt_id) - 1
|
||||
dropped = pkt_id - (prev+1)
|
||||
if dropped > 0:
|
||||
print(f"{prev},{pkt_id},{dropped}")
|
||||
prev = pkt_id
|
Loading…
Reference in a new issue