]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Enable profiling on slow regexps
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Dec 2019 16:27:32 +0000 (16:27 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Dec 2019 16:27:32 +0000 (16:27 +0000)
src/libserver/re_cache.c

index 3c9cec01f1fcc643152d17025438ea1d126168f7..1579092dc5120a4df63f76529c7bb3865e910da0 100644 (file)
@@ -591,6 +591,7 @@ rspamd_re_cache_process_pcre (struct rspamd_re_runtime *rt,
                        t2 = rspamd_get_ticks (TRUE);
 
                        if (t2 - t1 > slow_time) {
+                               rspamd_symcache_enable_profile (task);
                                msg_info_task ("regexp '%16s' took %.0f ticks to execute",
                                                rspamd_regexp_get_pattern (re), t2 - t1);
                        }