]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] More human friendly stats
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 10 May 2019 14:43:23 +0000 (15:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 10 May 2019 14:43:23 +0000 (15:43 +0100)
src/libserver/task.c

index b6f67886dacedee59ea2aa6c7e6a97fe28ffd95e..abe8143bc0bd0ca5bcdda3d482d188553a4d7499 100644 (file)
@@ -358,7 +358,7 @@ rspamd_task_free (struct rspamd_task *task)
                                gdouble t1, t2;
 
                                old_lua_mem = lua_gc (task->cfg->lua_state, LUA_GCCOUNT, 0);
-                               t1 = rspamd_get_ticks (TRUE);
+                               t1 = rspamd_get_ticks (FALSE);
 
 #ifdef WITH_JEMALLOC
                                gsize sz = sizeof (gsize);
@@ -373,14 +373,14 @@ rspamd_task_free (struct rspamd_task *task)
 # endif
 #endif
                                lua_gc (task->cfg->lua_state, LUA_GCCOLLECT, 0);
-                               t2 = rspamd_get_ticks (TRUE);
+                               t2 = rspamd_get_ticks (FALSE);
 
                                msg_notice_task ("perform full gc cycle; memory stats: "
-                                                                "%z allocated, %z active, %z metadata, %z resident, %z mapped;"
-                                                                " lua memory: %z kb -> %d kb; %f ticks for gc iter",
+                                                                "%Hz allocated, %Hz active, %Hz metadata, %Hz resident, %Hz mapped;"
+                                                                " lua memory: %z kb -> %d kb; %f ms for gc iter",
                                                allocated, active, metadata, resident, mapped,
                                                old_lua_mem, lua_gc (task->cfg->lua_state, LUA_GCCOUNT, 0),
-                                               t2 - t1);
+                                               (t2 - t1) * 1000.0);
                                free_iters = rspamd_time_jitter (0, (gdouble)free_iters_limit / 2);
                        }