Software /
code /
prosody
Diff
core/moduleapi.lua @ 6557:8aa967c81cbc
Merge 0.10->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 21 Jan 2015 01:29:00 +0000 |
parent | 6423:1c78f10f05d0 |
parent | 6556:74253c7beb9c |
child | 6647:0c363fddcdd9 |
line wrap: on
line diff
--- a/core/moduleapi.lua Mon Jan 19 14:09:13 2015 -0500 +++ b/core/moduleapi.lua Wed Jan 21 01:29:00 2015 +0000 @@ -14,6 +14,7 @@ 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 @@ 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;