Changeset

8386:9d5eb384daa8

MUC: Measure rate of room eviction
author Kim Alvefur <zash@zash.se>
date Thu, 09 Nov 2017 17:27:37 +0100
parents 8385:43d50a957463
children 8387:7d61431e1aa6
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Thu Nov 09 17:27:12 2017 +0100
+++ b/plugins/muc/mod_muc.lua	Thu Nov 09 17:27:37 2017 +0100
@@ -114,8 +114,10 @@
 	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);