commit bdad45f: [Minor] Enable profiling on slow regexps

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Dec 24 17:07:10 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-12-24 16:27:32 +0000
URL: https://github.com/rspamd/rspamd/commit/bdad45f8aa525378e5c2081798b88f7c9ca72e44

[Minor] Enable profiling on slow regexps

---
 src/libserver/re_cache.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index 3c9cec01f..1579092dc 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -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);
 			}


More information about the Commits mailing list