diff options
author | Cyril Bonté <cyril.bonte@free.fr> | 2014-05-30 01:35:54 +0400 |
---|---|---|
committer | Cyril Bonté <cyril.bonte@free.fr> | 2014-06-06 23:30:27 +0400 |
commit | 1b9ed739af3634511b03a7cd5f827801b5b4fa5a (patch) | |
tree | f76c4f6e404e4be49cab7d6fab75a19cbe553b3e /misc | |
parent | bbb9ad56191ab5eefed5b82248a3e43be6285c97 (diff) |
remove redundant exclusion check
check_methods are called twice for each hit. The first ones are sufficient to
decide if the hit should be excluded or not.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index cc1f848e96..c7e99b4f89 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1719,13 +1719,11 @@ class Parser(object): invalid_line(line, 'invalid encoding') continue - # Check if the hit must be excluded. - if all((method(hit) for method in self.check_methods)): - hits.append(hit) + hits.append(hit) - if len(hits) >= config.options.recorder_max_payload_size * len(Recorder.recorders): - Recorder.add_hits(hits) - hits = [] + if len(hits) >= config.options.recorder_max_payload_size * len(Recorder.recorders): + Recorder.add_hits(hits) + hits = [] # add last chunk of hits if len(hits) > 0: |