diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-14 13:00:14 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-14 13:00:14 +0000 |
commit | fc2e8055d2afa1d09dcbc42616581b84ca4f74e9 (patch) | |
tree | 4a31adc0a720bf682c525985dd8cd69f141861f1 /src/fuzzy_storage.c | |
parent | 563d89d5b8e90b477da878aa8564c09d15f34e6f (diff) | |
download | rspamd-fc2e8055d2afa1d09dcbc42616581b84ca4f74e9.tar.gz rspamd-fc2e8055d2afa1d09dcbc42616581b84ca4f74e9.zip |
[Minor] Save in stats
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 874e81c87..99a5a3bed 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -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; } |