commit 38600c0: [Minor] Use averages in fuzzystat
Vsevolod Stakhov
vsevolod at rspamd.com
Sat Jan 14 21:49:03 UTC 2023
Author: Vsevolod Stakhov
Date: 2023-01-14 21:41:43 +0000
URL: https://github.com/rspamd/rspamd/commit/38600c02a1b985bdf90aa78c279d9807ee05cd5f (HEAD -> master)
[Minor] Use averages in fuzzystat
---
lualib/rspamadm/fuzzy_stat.lua | 14 ++++++++++++--
1 file 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'])))
More information about the Commits
mailing list