aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-01-21 01:29:00 +0000
committerMatthew Wild <mwild1@gmail.com>2015-01-21 01:29:00 +0000
commitcd0dd3f92b02d855c98701792c179d02ad12bf24 (patch)
treea2ed9fcc1c1496bdcbdf1da40e868aa4d50246fa /core/moduleapi.lua
parent6591bd9db584bf6c5b8920c4438cd087bbfefce3 (diff)
parent5723bad906dcbef98eb1cdc196675a7a526f97cc (diff)
downloadprosody-cd0dd3f92b02d855c98701792c179d02ad12bf24.tar.gz
prosody-cd0dd3f92b02d855c98701792c179d02ad12bf24.zip
Merge 0.10->trunk
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 754d7497..d6aa0ef0 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -14,6 +14,7 @@ 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 t_insert, t_remove, t_concat = table.insert, table.remove, table.concat;
local error, setmetatable, type = error, setmetatable, type;
@@ -390,6 +391,10 @@ function api:open_store(name, type)
return require"core.storagemanager".open(self.host, name or self.name, type);
end
+function api:measure(name, type)
+ return measure(type, "/"..self.host.."/mod_"..self.name.."/"..name);
+end
+
function api.init(mm)
modulemanager = mm;
return api;