From e53908532ab8a6ba470393d171fe0ee41ee6aaaf Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Wed, 7 Dec 2016 19:40:53 +0300 Subject: [PATCH] [Minor] rspamd_stats: fix parsing of lines with `NaN` score --- utils/rspamd_stats.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 1e8e7a158..e1618d14d 100644 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -192,7 +192,7 @@ sub ProcessLog { if (/^.*rspamd_task_write_log.*$/) { $timeStamp{'end'} = join ' ', ( split /\s+/ )[ 0 .. 1 ]; - if ($_ !~ /\[(-?\d+(?:\.\d+)?)\/(-?\d+(?:\.\d+)?)\]\s+\[([^\]]+)\].+? time: (\d+\.\d+)ms real/) { + if ($_ !~ /\[(NaN|-?\d+(?:\.\d+)?)\/(-?\d+(?:\.\d+)?)\]\s+\[([^\]]+)\].+? time: (\d+\.\d+)ms real/) { #print "BAD: $_\n"; next; } -- 2.39.5