]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] rspamd_stats: fix parsing of lines with `NaN` score
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 7 Dec 2016 16:40:53 +0000 (19:40 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 7 Dec 2016 16:40:53 +0000 (19:40 +0300)
utils/rspamd_stats.pl

index 1e8e7a158b3de316132196c79a5fb8b75f6699d4..e1618d14dd1d296151620adf1d1ddd132494898a 100644 (file)
@@ -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;
       }