diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-10-26 07:14:48 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2008-10-26 07:14:48 +0300 |
commit | cc5343692b448c27485a24ea7f1b24d714bb82f6 (patch) | |
tree | d659a1795fad4da55e18c8fc6297233d5b71b57e /main.h | |
parent | c52d0879cc03345a6c41c724db6a3de59cca7d07 (diff) | |
download | rspamd-cc5343692b448c27485a24ea7f1b24d714bb82f6.tar.gz rspamd-cc5343692b448c27485a24ea7f1b24d714bb82f6.zip |
* Add determining page size function to mem_pool library
* Add simple statistic structure that is placed in shared memory and used for gathering server's stats
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -82,6 +82,16 @@ struct rspamd_worker { struct pidfh; struct config_file; +/* Server statistics */ +struct rspamd_stat { + unsigned int messages_scanned; + unsigned int messages_spam; + unsigned int messages_ham; + unsigned int connections_count; + unsigned int control_connections_count; + unsigned int messages_learned; +}; + /* Struct that determine main server object (for logging purposes) */ struct rspamd_main { struct config_file *cfg; @@ -89,7 +99,10 @@ struct rspamd_main { /* Pid file structure */ struct pidfh *pfh; enum process_type type; - unsigned ev_initialized:1; + unsigned int ev_initialized; + struct rspamd_stat *stat; + + memory_pool_t *server_pool; TAILQ_HEAD (workq, rspamd_worker) workers; }; |