aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-07 21:55:18 +0200
committerKim Alvefur <zash@zash.se>2018-07-07 21:55:18 +0200
commitb58c44e43aab9f7f6c2793fc71bb2177e9e90084 (patch)
tree53ec284511e11644c2307dc3914701ce1a9e3b9c
parent5884db59cc58af1cf5848f1d560ed85a452b8e8b (diff)
downloadprosody-b58c44e43aab9f7f6c2793fc71bb2177e9e90084.tar.gz
prosody-b58c44e43aab9f7f6c2793fc71bb2177e9e90084.zip
moduleapi: Lazy-load statsmanager on demand
-rw-r--r--core/moduleapi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 0795f8ef..2afd54cd 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -13,7 +13,6 @@ local logger = require "util.logger";
local pluginloader = require "util.pluginloader";
local timer = require "util.timer";
local resolve_relative_path = require"util.paths".resolve_relative_path;
-local measure = require "core.statsmanager".measure;
local st = require "util.stanza";
local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
@@ -411,6 +410,7 @@ function api:open_store(name, store_type)
end
function api:measure(name, stat_type)
+ local measure = require "core.statsmanager".measure;
return measure(stat_type, "/"..self.host.."/mod_"..self.name.."/"..name);
end