diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-11 13:10:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-11 13:10:26 +0000 |
commit | 2236bd4b7c70fd5d288406a7e979c1643ff78ac3 (patch) | |
tree | 94d794431f300f8e3f7b2490baddf480d552e56b /src/libserver/re_cache.c | |
parent | ab85e7b66d095e8e1dbf3b535084709be380086c (diff) | |
download | rspamd-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.c | 2 |
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 { |