commit 128a0bb: [Minor] More human friendly stats

Vsevolod Stakhov vsevolod at highsecure.ru
Fri May 10 14:49:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-05-10 15:43:23 +0100
URL: https://github.com/rspamd/rspamd/commit/128a0bbe9d54cb9350641062a7125b39327fb87d

[Minor] More human friendly stats

---
 src/libserver/task.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libserver/task.c b/src/libserver/task.c
index b6f67886d..abe8143bc 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -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);
 			}
 


More information about the Commits mailing list