]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Save in stats
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 14 Jan 2023 13:00:14 +0000 (13:00 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 14 Jan 2023 13:00:14 +0000 (13:00 +0000)
src/fuzzy_storage.c

index 874e81c87abca18216fc7a766b4b4072c5d55a4e..99a5a3bedcc8db747f4cc22a6b50941fae744080 100644 (file)
@@ -1873,15 +1873,19 @@ rspamd_fuzzy_storage_stat_key (struct fuzzy_key_stat *key_stat)
        res = ucl_object_typed_new (UCL_OBJECT);
 
        ucl_object_insert_key (res, ucl_object_fromint (key_stat->checked),
-                       "checked", 0, false);
+               "checked", 0, false);
+       ucl_object_insert_key (res, ucl_object_fromdouble(key_stat->checked_ctr.mean),
+               "checked_per_hour", 0, false);
        ucl_object_insert_key (res, ucl_object_fromint (key_stat->matched),
-                       "matched", 0, false);
+               "matched", 0, false);
+       ucl_object_insert_key (res, ucl_object_fromdouble(key_stat->checked_ctr.mean),
+               "matched_per_hour", 0, false);
        ucl_object_insert_key (res, ucl_object_fromint (key_stat->added),
-                       "added", 0, false);
+               "added", 0, false);
        ucl_object_insert_key (res, ucl_object_fromint (key_stat->deleted),
-                       "deleted", 0, false);
+               "deleted", 0, false);
        ucl_object_insert_key (res, ucl_object_fromint (key_stat->errors),
-                       "errors", 0, false);
+               "errors", 0, false);
 
        return res;
 }