diff options
author | Kim Alvefur <zash@zash.se> | 2017-11-09 17:27:37 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-11-09 17:27:37 +0100 |
commit | e24d16dca8a8c4cdf57732e68eaf45d5e051d5b3 (patch) | |
tree | a8d5dddaace7dd9b3d9186954b08f6b0bb4d3ed5 /plugins/muc/mod_muc.lua | |
parent | ec6b526ce119090f9f7214c1af221eb9b9207251 (diff) | |
download | prosody-e24d16dca8a8c4cdf57732e68eaf45d5e051d5b3.tar.gz prosody-e24d16dca8a8c4cdf57732e68eaf45d5e051d5b3.zip |
MUC: Measure rate of room eviction
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-rw-r--r-- | plugins/muc/mod_muc.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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); |