Software /
code /
prosody
Changeset
8994:f17e768c1a99
moduleapi: Lazy-load statsmanager on demand
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 07 Jul 2018 21:55:18 +0200 |
parents | 8993:bd9b67f742c9 |
children | 8995:2e6f7ab97794 |
files | core/moduleapi.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/moduleapi.lua Sat Jul 07 21:55:00 2018 +0200 +++ b/core/moduleapi.lua Sat Jul 07 21:55:18 2018 +0200 @@ -13,7 +13,6 @@ 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 @@ end function api:measure(name, stat_type) + local measure = require "core.statsmanager".measure; return measure(stat_type, "/"..self.host.."/mod_"..self.name.."/"..name); end