Diff

plugins/muc/mod_muc.lua @ 8386:9d5eb384daa8

MUC: Measure rate of room eviction
author Kim Alvefur <zash@zash.se>
date Thu, 09 Nov 2017 17:27:37 +0100
parent 8385:43d50a957463
child 8387:7d61431e1aa6
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);