From 1d41bbc187ac59ba497b092133fa4ec72949a3a6 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sun, 2 Feb 2020 10:04:56 +0100 Subject: [PATCH] Improve script --- scripts/jantoran_2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/jantoran_2.py b/scripts/jantoran_2.py index 8a7decb..3205dbc 100755 --- a/scripts/jantoran_2.py +++ b/scripts/jantoran_2.py @@ -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: