aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/re_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-11 13:10:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-11 13:10:26 +0000
commit2236bd4b7c70fd5d288406a7e979c1643ff78ac3 (patch)
tree94d794431f300f8e3f7b2490baddf480d552e56b /src/libserver/re_cache.c
parentab85e7b66d095e8e1dbf3b535084709be380086c (diff)
downloadrspamd-2236bd4b7c70fd5d288406a7e979c1643ff78ac3.tar.gz
rspamd-2236bd4b7c70fd5d288406a7e979c1643ff78ac3.zip
[Feature] Add more information about regexps
Diffstat (limited to 'src/libserver/re_cache.c')
-rw-r--r--src/libserver/re_cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index 8ab0cd031..b599a7085 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -438,6 +438,7 @@ rspamd_re_cache_runtime_new (struct rspamd_re_cache *cache)
REF_RETAIN (cache);
rt->checked = g_slice_alloc0 (NBYTES (cache->nre));
rt->results = g_slice_alloc0 (cache->nre);
+ rt->stat.regexp_total = cache->nre;
return rt;
}
@@ -838,6 +839,7 @@ rspamd_re_cache_process (struct rspamd_task *task,
if (isset (rt->checked, re_id)) {
/* Fast path */
+ rt->stat.regexp_fast_cached ++;
return rt->results[re_id];
}
else {