aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-06 15:06:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-06 15:06:03 +0100
commit489ec47bd8b9c5f34e506e78e392a0bc689ab2b5 (patch)
tree1f02c8f7af49f30e99300b4b23a0f91d363ed925
parentd89232620109508913664acbafe780a112a84fd1 (diff)
downloadrspamd-489ec47bd8b9c5f34e506e78e392a0bc689ab2b5.tar.gz
rspamd-489ec47bd8b9c5f34e506e78e392a0bc689ab2b5.zip
Save profile for the main process.
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2d6216b1f..505b52343 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1322,6 +1322,8 @@ main (gint argc, gchar **argv, gchar **env)
return res ? EXIT_SUCCESS : EXIT_FAILURE;
}
+ gperf_profiler_init (rspamd_main->cfg, "main");
+
msg_info ("rspamd " RVERSION " is starting, build id: " RID);
rspamd_main->cfg->cfg_name = rspamd_mempool_strdup (
rspamd_main->cfg->cfg_pool,
@@ -1391,6 +1393,9 @@ main (gint argc, gchar **argv, gchar **env)
rspamd_main->cfg->history_file);
}
+#if defined(WITH_GPERF_TOOLS)
+ ProfilerStop ();
+#endif
/* Spawn workers */
rspamd_main->workers = g_hash_table_new (g_direct_hash, g_direct_equal);
spawn_workers (rspamd_main);