logo       

[SACVS] CVS: spamassassin/lib/Mail/SpamAssassin Conf.pm,1.255,1.256 Dns.pm,: msg#00070

mail.spam.spamassassin.cvs

Subject: [SACVS] CVS: spamassassin/lib/Mail/SpamAssassin Conf.pm,1.255,1.256 Dns.pm,1.145,1.146 PerMsgLearner.pm,1.6,1.7 PerMsgStatus.pm,1.352,1.353 Reporter.pm,1.60,1.61

Update of /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin
In directory sc8-pr-cvs1:/tmp/cvs-serv16532/lib/Mail/SpamAssassin

Modified Files:
Conf.pm Dns.pm PerMsgLearner.pm PerMsgStatus.pm Reporter.pm
Log Message:
bug 2476: remove timelog code


Index: Conf.pm
===================================================================
RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Conf.pm,v
retrieving revision 1.255
retrieving revision 1.256
diff -b -w -u -d -r1.255 -r1.256
--- Conf.pm 17 Sep 2003 21:16:40 -0000 1.255
+++ Conf.pm 19 Sep 2003 01:51:28 -0000 1.256
@@ -2317,22 +2317,6 @@
$self->{bayes_path} = $1; next;
}

-=item timelog_path /path/to/dir (default: NULL)
-
-If you set this value, SpamAssassin will try to create logfiles for each
-message it processes and dump information on how fast it ran, and in which
-parts of the code the time was spent. The files will be named:
-C<unixdate_messageid> (i.e 1023257504_chuvn31gdu@xxxxxxx)
-
-Make sure SA can write the log file; if you're not sure what permissions are
-needed, chmod the log directory to 1777, and adjust later.
-
-=cut
-
- if (/^timelog_path\s+(.*)$/) {
- $Mail::SpamAssassin::TIMELOG->{logpath}=$1; next;
- }
-
=item auto_whitelist_file_mode (default: 0700)

The file mode bits used for the automatic-whitelist directory or file.

Index: Dns.pm
===================================================================
RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Dns.pm,v
retrieving revision 1.145
retrieving revision 1.146
diff -b -w -u -d -r1.145 -r1.146
--- Dns.pm 16 Sep 2003 22:54:38 -0000 1.145
+++ Dns.pm 19 Sep 2003 01:51:28 -0000 1.146
@@ -372,8 +372,6 @@
# this test covers all aspects of availability
if (!$self->is_razor2_available()) { return 0; }

- timelog("Razor2 -> Starting razor test ($timeout secs max)", "razor", 1);
-
# razor also debugs to stdout. argh. fix it to stderr...
if ($Mail::SpamAssassin::DEBUG->{enabled}) {
open (OLDOUT, ">&STDOUT");
@@ -515,10 +513,8 @@
dbg("Razor2 results: spam? ".$self->{razor2_result}." highest cf score:
".$self->{razor2_cf_score});

if ($self->{razor2_result} > 0) {
- timelog("Razor2 -> Finished razor test: confirmed spam", "razor", 2);
return 1;
}
- timelog("Razor2 -> Finished razor test: not known spam", "razor", 2);
return 0;
}

@@ -611,7 +607,6 @@
return 0;
}

- timelog("DCCifd -> Starting test ($timeout secs max)", "dcc", 1);
$self->enter_helper_run_mode();

eval {
@@ -662,18 +657,15 @@
$response = undef;
if ($@ =~ /alarm/) {
dbg ("DCCifd check timed out after $timeout secs.");
- timelog("DCCifd -> interrupted after $timeout secs", "dcc", 2);
return 0;
} else {
warn ("DCCifd -> check skipped: $! $@");
- timelog("dcc check skipped", "dcc", 2);
return 0;
}
}

if (!defined $response || $response !~ /^X-DCC/) {
dbg ("DCCifd -> check failed - no X-DCC returned: $response");
- timelog("dcc check failed", "dcc", 2);
return 0;
}

@@ -697,11 +689,9 @@

if ($count{body} >= $self->{conf}->{dcc_body_max} || $count{fuz1} >=
$self->{conf}->{dcc_fuz1_max} || $count{fuz2} >= $self->{conf}->{dcc_fuz2_max})
{
dbg ("DCCifd: Listed! BODY: $count{body} of $self->{conf}->{dcc_body_max}
FUZ1: $count{fuz1} of $self->{conf}->{dcc_fuz1_max} FUZ2: $count{fuz2} of
$self->{conf}->{dcc_fuz2_max}");
- timelog("DCCifd -> got hit", "dcc", 2);
return 1;
}

- timelog("DCCifd -> no match", "dcc", 2);
return 0;
}

@@ -721,7 +711,6 @@
}
if (!$self->{conf}->{use_dcc}) { return 0; }

- timelog("DCC -> Starting check ($timeout secs max)", "dcc", 1);
$self->enter_helper_run_mode();

# use a temp file here -- open2() is unreliable, buffering-wise,
@@ -777,23 +766,18 @@
if ($@) {
if ($@ =~ /^__alarm__$/) {
dbg ("DCC -> check timed out after $timeout secs.");
- timelog("DCC interrupted after $timeout secs", "dcc", 2);
} elsif ($@ =~ /^__brokenpipe__$/) {
dbg ("DCC -> check failed: Broken pipe.");
- timelog("DCC check failed, broken pipe", "dcc", 2);
} elsif ($@ eq "no response\n") {
dbg ("DCC -> check failed: no response");
- timelog("DCC check failed, no response", "dcc", 2);
} else {
warn ("DCC -> check failed: $@\n");
- timelog("DCC check failed", "dcc", 2);
}
return 0;
}

if (!defined($response) || $response !~ /^X-DCC/) {
dbg ("DCC -> check failed: no X-DCC returned (did you create a map file?):
$response");
- timelog("DCC check failed", "dcc", 2);
return 0;
}

@@ -817,11 +801,9 @@

if ($count{body} >= $self->{conf}->{dcc_body_max} || $count{fuz1} >=
$self->{conf}->{dcc_fuz1_max} || $count{fuz2} >= $self->{conf}->{dcc_fuz2_max})
{
dbg ("DCC: Listed! BODY: $count{body} of $self->{conf}->{dcc_body_max}
FUZ1: $count{fuz1} of $self->{conf}->{dcc_fuz1_max} FUZ2: $count{fuz2} of
$self->{conf}->{dcc_fuz2_max}");
- timelog("DCC -> got hit", "dcc", 2);
return 1;
}

- timelog("DCC -> check had no match", "dcc", 2);
return 0;
}

@@ -864,7 +846,6 @@
}
if (!$self->{conf}->{use_pyzor}) { return 0; }

- timelog("Pyzor -> Starting check ($timeout secs max)", "pyzor", 1);
$self->enter_helper_run_mode();

# use a temp file here -- open2() is unreliable, buffering-wise,
@@ -908,16 +889,12 @@
if ($@) {
if ($@ =~ /^__alarm__$/) {
dbg ("Pyzor -> check timed out after $timeout secs.");
- timelog("Pyzor interrupted after $timeout secs", "pyzor", 2);
} elsif ($@ =~ /^__brokenpipe__$/) {
dbg ("Pyzor -> check failed: Broken pipe.");
- timelog("Pyzor check failed, broken pipe", "pyzor", 2);
} elsif ($@ eq "no response\n") {
dbg ("Pyzor -> check failed: no response");
- timelog("Pyzor check failed, no response", "pyzor", 2);
} else {
warn ("Pyzor -> check failed: $@\n");
- timelog("Pyzor check failed", "pyzor", 2);
}
return 0;
}
@@ -943,11 +920,9 @@

if ($pyzor_count >= $self->{conf}->{pyzor_max}) {
dbg ("Pyzor: Listed! $pyzor_count of $self->{conf}->{pyzor_max} and
whitelist is $pyzor_whitelisted");
- timelog("Pyzor -> got hit", "pyzor", 2);
return 1;
}

- timelog("Pyzor -> no match", "pyzor", 2);
return 0;
}


Index: PerMsgLearner.pm
===================================================================
RCS file:
/cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgLearner.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -w -u -d -r1.6 -r1.7
--- PerMsgLearner.pm 9 Jan 2003 23:51:56 -0000 1.6
+++ PerMsgLearner.pm 19 Sep 2003 01:51:28 -0000 1.7
@@ -158,7 +158,6 @@
###########################################################################

sub dbg { Mail::SpamAssassin::dbg (@_); }
-sub timelog { Mail::SpamAssassin::timelog (@_); }

###########################################################################


Index: PerMsgStatus.pm
===================================================================
RCS file:
/cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm,v
retrieving revision 1.352
retrieving revision 1.353
diff -b -w -u -d -r1.352 -r1.353
--- PerMsgStatus.pm 19 Sep 2003 00:55:02 -0000 1.352
+++ PerMsgStatus.pm 19 Sep 2003 01:51:28 -0000 1.353
@@ -132,21 +132,13 @@
}

{
- # If you run timelog from within specified rules, prefix the message with
- # "Rulename -> " so that it's easy to pick out details from the overview
- timelog("Launching RBL queries in the background", "rblbg", 1);
-
# Here, we launch all the DNS RBL queries and let them run while we
# inspect the message
$self->run_rbl_eval_tests ($self->{conf}->{rbl_evals});

- timelog("Finished launching RBL queries in the background", "rblbg", 2);
-
- timelog("Starting head tests", "headtest", 1);
+ # do head tests
$self->do_head_tests();
- timelog("Finished head tests", "headtest", 2);

- timelog("Starting body tests", "bodytest", 1);
# do body tests with decoded portions
{
my $decoded = $self->get_decoded_stripped_body_text_array();
@@ -155,9 +147,7 @@
$self->do_body_eval_tests($decoded);
undef $decoded;
}
- timelog("Finished body tests", "bodytest", 2);

- timelog("Starting raw body tests", "rawbodytest", 1);
# do rawbody tests with raw text portions
{
my $bodytext = $self->get_decoded_body_text_array();
@@ -167,9 +157,7 @@
$self->do_body_uri_tests($bodytext);
undef $bodytext;
}
- timelog("Finished raw body tests", "rawbodytest", 2);

- timelog("Starting full message tests", "fullmsgtest", 1);
# and do full tests: first with entire, full, undecoded message
# still skip application/image attachments though
{
@@ -179,14 +167,8 @@
$self->do_full_eval_tests(\$fulltext);
undef $fulltext;
}
- timelog("Finished full message tests", "fullmsgtest", 2);

- timelog("Starting head eval tests", "headevaltest", 1);
$self->do_head_eval_tests();
- timelog("Finished head eval tests", "headevaltest", 2);
-
- timelog("Starting RBL tests (will wait up to ".$self->{conf}->{rbl_timeout}
- ." secs before giving up)", "rblblock", 1);

# harvest the DNS results
$self->harvest_dnsbl_queries();
@@ -194,8 +176,6 @@
# finish the DNS results
$self->rbl_finish();

- timelog("Finished all RBL tests", "rblblock", 2);
-
# Do meta rules second-to-last
$self->do_meta_tests();

@@ -2485,7 +2465,6 @@
###########################################################################

sub dbg { Mail::SpamAssassin::dbg (@_); }
-sub timelog { Mail::SpamAssassin::timelog (@_); }
sub sa_die { Mail::SpamAssassin::sa_die (@_); }

###########################################################################

Index: Reporter.pm
===================================================================
RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Reporter.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -b -w -u -d -r1.60 -r1.61
--- Reporter.pm 22 Aug 2003 20:42:41 -0000 1.60
+++ Reporter.pm 19 Sep 2003 01:51:28 -0000 1.61
@@ -250,7 +250,6 @@
my ($self, $fulltext) = @_;
my $timeout=$self->{conf}->{dcc_timeout};

- timelog("DCC -> Starting report ($timeout secs max)", "dcc", 1);
$self->enter_helper_run_mode();

# use a temp file here -- open2() is unreliable, buffering-wise,
@@ -284,18 +283,14 @@
if ($@) {
if ($@ =~ /^__alarm__$/) {
dbg ("DCC -> report timed out after $timeout secs.");
- timelog("DCC interrupted after $timeout secs", "dcc", 2);
} elsif ($@ =~ /^__brokenpipe__$/) {
dbg ("DCC -> report failed: Broken pipe.");
- timelog("DCC report failed, broken pipe", "dcc", 2);
} else {
warn ("DCC -> report failed: $@\n");
- timelog("DCC report failed", "dcc", 2);
}
return 0;
}

- timelog("DCC -> report finished", "dcc", 2);
return 1;
}

@@ -303,7 +298,6 @@
my ($self, $fulltext) = @_;
my $timeout=$self->{conf}->{pyzor_timeout};

- timelog("Pyzor -> Starting report ($timeout secs max)", "pyzor", 1);
$self->enter_helper_run_mode();

# use a temp file here -- open2() is unreliable, buffering-wise,
@@ -337,24 +331,19 @@
if ($@) {
if ($@ =~ /^__alarm__$/) {
dbg ("Pyzor -> report timed out after $timeout secs.");
- timelog("Pyzor interrupted after $timeout secs", "pyzor", 2);
} elsif ($@ =~ /^__brokenpipe__$/) {
dbg ("Pyzor -> report failed: Broken pipe.");
- timelog("Pyzor report failed, broken pipe", "pyzor", 2);
} else {
warn ("Pyzor -> report failed: $@\n");
- timelog("Pyzor report failed", "pyzor", 2);
}
return 0;
}

- timelog("Pyzor -> report finished", "pyzor", 2);
return 1;
}
###########################################################################

sub dbg { Mail::SpamAssassin::dbg (@_); }
-sub timelog { Mail::SpamAssassin::timelog (@_); }
sub create_fulltext_tmpfile {
Mail::SpamAssassin::PerMsgStatus::create_fulltext_tmpfile(@_) }
sub delete_fulltext_tmpfile {
Mail::SpamAssassin::PerMsgStatus::delete_fulltext_tmpfile(@_) }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise