diff options
Diffstat (limited to 'src/libserver/re_cache.h')
-rw-r--r-- | src/libserver/re_cache.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libserver/re_cache.h b/src/libserver/re_cache.h index 429d16e0a..8e3505ba7 100644 --- a/src/libserver/re_cache.h +++ b/src/libserver/re_cache.h @@ -42,6 +42,13 @@ enum rspamd_re_type { RSPAMD_RE_MAX }; +struct rspamd_re_cache_stat { + guint64 bytes_scanned; + guint64 bytes_scanned_pcre; + guint regexp_checked; + guint regexp_matched; +}; + /** * Initialize re_cache persistent structure */ @@ -79,6 +86,12 @@ void rspamd_re_cache_init (struct rspamd_re_cache *cache); struct rspamd_re_runtime* rspamd_re_cache_runtime_new (struct rspamd_re_cache *cache); /** + * Get runtime statistics + */ +const struct rspamd_re_cache_stat * + rspamd_re_cache_get_stat (struct rspamd_re_runtime *rt); + +/** * Process regexp runtime and return the result for a specific regexp * @param task task object * @param rt cache runtime object |