You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2015/05/13 23:28:52 UTC
svn commit: r1679280 - /spamassassin/branches/3.4/spamd/spamd.raw
Author: kmcgrail
Date: Wed May 13 21:28:52 2015
New Revision: 1679280
URL: http://svn.apache.org/r1679280
Log:
adds --timing parm for spamd for 3.4 branch - bug 7194
Modified:
spamassassin/branches/3.4/spamd/spamd.raw
Modified: spamassassin/branches/3.4/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/spamd/spamd.raw?rev=1679280&r1=1679279&r2=1679280&view=diff
==============================================================================
--- spamassassin/branches/3.4/spamd/spamd.raw (original)
+++ spamassassin/branches/3.4/spamd/spamd.raw Wed May 13 21:28:52 2015
@@ -415,6 +415,7 @@ GetOptions(
'log-timestamp-fmt:s' => \$opt{'log-timestamp-fmt'},
'timeout-tcp|T=i' => \$opt{'timeout-tcp'},
'timeout-child|t=i' => \$opt{'timeout-child'},
+ 'timing' => \$opt{'timing'},
'user-config' => \$opt{'user-config'},
'username|u=s' => \$opt{'username'},
'version|V' => \$opt{'version'},
@@ -1171,6 +1172,11 @@ my $spamtest = Mail::SpamAssassin->new(
}
);
+#Enable Timing?
+if ($opt{'timing'}) {
+ $spamtest->timer_enable();
+}
+
# if $clients_per_child == 1, there's no point in copying configs around
unless ($clients_per_child > 1) {
# unset $copy_config_p so we don't bother trying to copy things back
@@ -1456,7 +1462,12 @@ sub spawn {
}
undef $current_user;
- dbg("timing: " . $spamtest->timer_report()) if would_log('dbg', 'timing');
+ #LOG TIMING
+ if ($opt{'timing'}) {
+ info("timing: " . $spamtest->timer_report());
+ } else {
+ dbg("timing: " . $spamtest->timer_report()) if would_log('dbg', 'timing');
+ }
}
# If the child lives to get here, it will die ... Muhaha.
@@ -3240,6 +3251,7 @@ Options:
--socketowner=name Set UNIX domain socket file's owner
--socketgroup=name Set UNIX domain socket file's group
--socketmode=mode Set UNIX domain socket file's mode
+ --timing Enable timing and logging
-V, --version Print version and exit
The --listen option (or -i) may be specified multiple times, its syntax
@@ -3775,6 +3787,12 @@ Set UNIX domain socket to use the octal
used, that user should have write permissions to unlink the file later, for
when the C<spamd> server is killed.
+
+=item B<--timing>
+
+ Enable timing measurements and output the information for logging. This
+ is the same information as provided by the TIMING tag.
+
=back
=head1 SEE ALSO