Improve script

This commit is contained in:
Quentin 2020-02-02 10:04:56 +01:00
parent 730a067e29
commit 1d41bbc187
1 changed files with 4 additions and 1 deletions

View File

@ -25,8 +25,11 @@ def compute_dropped(s):
s['current']['missing'].append((start, s['current']['npkt'], 1+s['current']['npkt']-start))
t = s['current']['missing']
t = filter(lambda p: (lambda start, stop, diff: start != 0)(*p), t)
# Don't consider first 10 seconds are links are still being connected
t = filter(lambda p: (lambda start, stop, diff: start > 250)(*p), t)
# Below 1 second continuous drop, don't consider the call dropped
t = filter(lambda p: (lambda start, stop, diff: diff > 25)(*p), t)
# Don't consider the last drop as it is already parsed elsewhere
t = filter(lambda p: (lambda start, stop, diff: stop != s['current']['npkt'])(*p), t)
t = [x for x in t]
if len(t) > 0: