From d08085faf0cb566190e52362ba28a9f81c6925a9 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Sun, 7 May 2017 16:56:12 +0200 Subject: [PATCH] Don't save all robots requests (only first pass is kept) which allow to save a large amount of memory/disk space --- iwla.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iwla.py b/iwla.py index aba885f..44f4b73 100755 --- a/iwla.py +++ b/iwla.py @@ -310,7 +310,9 @@ class IWLA(object): self._createVisitor(hit) super_hit = self.current_analysis['visits'][remote_addr] - super_hit['requests'].append(hit) + # Don't keep all requests for robots + if not super_hit['robot']: + super_hit['requests'].append(hit) super_hit['bandwidth'] += int(hit['body_bytes_sent']) super_hit['last_access'] = self.meta_infos['last_time']