}
if (rspamd_symbols_cache_stat_symbol (session->ctx->cfg->cache,
- sym->name, &freq, &freq_dev, &tm)) {
+ sym->name, &freq, &freq_dev, &tm, NULL)) {
ucl_object_insert_key (sym_obj,
ucl_object_fromdouble (freq),
"frequency", 0, false);
gboolean
rspamd_symbols_cache_stat_symbol (struct symbols_cache *cache,
- const gchar *name,
- gdouble *frequency,
- gdouble *freq_stddev,
- gdouble *tm)
+ const gchar *name, gdouble *frequency, gdouble *freq_stddev,
+ gdouble *tm, guint *nhits)
{
struct cache_item *item;
*freq_stddev = sqrt (item->st->stddev_frequency);
*tm = item->st->time_counter.mean;
+ if (nhits) {
+ *nhits = item->st->hits;
+ }
+
return TRUE;
}
* @return
*/
gboolean rspamd_symbols_cache_stat_symbol (struct symbols_cache *cache,
- const gchar *name,
- gdouble *frequency,
- gdouble *freq_stddev,
- gdouble *tm);
+ const gchar *name, gdouble *frequency, gdouble *freq_stddev,
+ gdouble *tm, guint *nhits);
/**
* Find symbol in cache by its id
* @param cache