exit codes in docs [was: Correction to integrating-with-postfix]
Clint Adams
schizo at debian.org
Sun Aug 3 01:38:09 CEST 2003
> One objective of bogofilter is to scale well. Parsing ASCII output
> takes a good bit more time than checking return codes.
I don't think that that's true. These aren't the days of MS-DOS and %ERRORLEVEL%.
% repeat 5 time zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam'
zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam' 0.02s user 0.00s system 16% cpu 0.124 total
zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam' 0.01s user 0.02s system 188% cpu 0.016 total
zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam' 0.01s user 0.01s system 74% cpu 0.027 total
zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam' 0.02s user 0.00s system 126% cpu 0.016 total
zsh -c 'echo hi | bogofilter -f ; test $? -gt 66 && echo spam' 0.01s user 0.01s system 29% cpu 0.069 total
% repeat 5 time zsh -c 'setopt extendedglob; zmodload zsh/mathfunc; res=`echo hi | bogofilter -ftv` ; [[ $res = [A-Z]\ (#b)([0-9].[0-9]##) ]] && res=$match[1] ; test $(( floor(res * 100) )) -gt 66 && echo spam'
zsh -c 0.00s user 0.02s system 18% cpu 0.110 total
zsh -c 0.01s user 0.01s system 109% cpu 0.018 total
zsh -c 0.00s user 0.02s system 120% cpu 0.017 total
zsh -c 0.01s user 0.00s system 13% cpu 0.076 total
zsh -c 0.01s user 0.00s system 15% cpu 0.067 total
More information about the Bogofilter
mailing list