diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-14 21:41:43 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-14 21:41:43 +0000 |
commit | 38600c02a1b985bdf90aa78c279d9807ee05cd5f (patch) | |
tree | 42162e2177dc0dc7d6f94ee905d4ef9618c034be /lualib/rspamadm | |
parent | fc2e8055d2afa1d09dcbc42616581b84ca4f74e9 (diff) | |
download | rspamd-38600c02a1b985bdf90aa78c279d9807ee05cd5f.tar.gz rspamd-38600c02a1b985bdf90aa78c279d9807ee05cd5f.zip |
[Minor] Use averages in fuzzystat
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r-- | lualib/rspamadm/fuzzy_stat.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lualib/rspamadm/fuzzy_stat.lua b/lualib/rspamadm/fuzzy_stat.lua index c3372ca91..3959103a5 100644 --- a/lualib/rspamadm/fuzzy_stat.lua +++ b/lualib/rspamadm/fuzzy_stat.lua @@ -59,10 +59,20 @@ end local function print_stat(st, tabs) if st['checked'] then - print(string.format('%sChecked: %s', tabs, print_num(st['checked']))) + if st.checked_per_hour then + print(string.format('%sChecked: %s (%s per hour in average)', tabs, + print_num(st['checked']), print_num(st['checked_per_hour']))) + else + print(string.format('%sChecked: %s', tabs, print_num(st['checked']))) + end end if st['matched'] then - print(string.format('%sMatched: %s', tabs, print_num(st['matched']))) + if st.matched_per_hour then + print(string.format('%sMatched: %s (%s per hour in average)', tabs, + print_num(st['matched']), print_num(st['matched_per_hour']))) + else + print(string.format('%sMatched: %s', tabs, print_num(st['matched']))) + end end if st['errors'] then print(string.format('%sErrors: %s', tabs, print_num(st['errors']))) |