From e24d16dca8a8c4cdf57732e68eaf45d5e051d5b3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 9 Nov 2017 17:27:37 +0100 Subject: MUC: Measure rate of room eviction --- plugins/muc/mod_muc.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/muc') diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index 2a616902..f0eb1de8 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -114,8 +114,10 @@ local function room_save(room, forced, savestate) end end +local eviction_hit_rate = module:measure("room_eviction", "rate"); local rooms = cache.new(module:get_option_number("muc_room_cache_size", 100), function (jid, room) module:log("debug", "Evicting room %s", jid); + eviction_hit_rate(); room_save(room, nil, true); -- Force to disk end); -- cgit v1.2.3