소스 검색

[Minor] Show percentages

tags/3.6
Vsevolod Stakhov 1 년 전
부모
커밋
d932fb8f52
No account linked to committer's email address
1개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제
  1. 14
    4
      lualib/rspamadm/fuzzy_stat.lua

+ 14
- 4
lualib/rspamadm/fuzzy_stat.lua 파일 보기

@@ -78,11 +78,21 @@ local function print_stat(st, tabs)
end
end
if st['matched'] then
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'])))
if st.checked and st.checked > 0 and st.checked <= st.matched then
local percentage = st.matched / st.checked * 100.0
if st.matched_per_hour then
print(string.format('%sMatched: %s - %s percent (%s per hour in average)', tabs,
print_num(st['matched']), percentage, print_num(st['matched_per_hour'])))
else
print(string.format('%sMatched: %s - %s percent', tabs, print_num(st['matched']), percentage))
end
else
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
end
if st['errors'] then

Loading…
취소
저장