aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-26 21:30:43 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-26 21:30:43 +0400
commitbbc501fbfd1f8ffe67b97cc684ca5c1152ccbfd1 (patch)
tree0a1b09266ce8b416ed896ca521f372dc67ad7771 /src/protocol.c
parent7e440d6f4392a302d6cd4e886fe6da42ae87fed2 (diff)
downloadrspamd-bbc501fbfd1f8ffe67b97cc684ca5c1152ccbfd1.tar.gz
rspamd-bbc501fbfd1f8ffe67b97cc684ca5c1152ccbfd1.zip
* Improve statistics for scanned messages.
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/protocol.c b/src/protocol.c
index 51290cdf1..b4dcd7d13 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -1170,6 +1170,10 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data
metric_res->metric);
}
+ if (G_LIKELY (action <= METRIC_ACTION_NOACTION)) {
+ task->worker->srv->stat->actions_stat[action] ++;
+ }
+
if (!task->is_json) {
r = print_metric_data_rspamc (task, outbuf, sizeof (outbuf), metric_res, metric_res->metric, ms, rs, action);
}
@@ -1428,12 +1432,6 @@ write_check_reply (struct worker_task *task)
/* Increase counters */
task->worker->srv->stat->messages_scanned++;
- if (default_score >= default_required_score) {
- task->worker->srv->stat->messages_spam ++;
- }
- else {
- task->worker->srv->stat->messages_ham ++;
- }
return TRUE;
}
@@ -1541,12 +1539,6 @@ write_process_reply (struct worker_task *task)
}
task->worker->srv->stat->messages_scanned++;
- if (default_score >= default_required_score) {
- task->worker->srv->stat->messages_spam ++;
- }
- else {
- task->worker->srv->stat->messages_ham ++;
- }
return TRUE;
}