aboutsummaryrefslogtreecommitdiffstats
path: root/core/statsmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-01-21 01:26:06 +0000
committerMatthew Wild <mwild1@gmail.com>2015-01-21 01:26:06 +0000
commit6790b2a0ba6b2b10ad327334296b48544e2c6553 (patch)
tree0eb96a3dc21fa2b13b00d887a72ef96a811c2f3e /core/statsmanager.lua
parenta88d04d1c41f710bac967ddeb5558263ab73da53 (diff)
downloadprosody-6790b2a0ba6b2b10ad327334296b48544e2c6553.tar.gz
prosody-6790b2a0ba6b2b10ad327334296b48544e2c6553.zip
statsmanager, util.statistics: API changes, remove debugging
Diffstat (limited to 'core/statsmanager.lua')
-rw-r--r--core/statsmanager.lua14
1 files changed, 3 insertions, 11 deletions
diff --git a/core/statsmanager.lua b/core/statsmanager.lua
index 83df6181..62d217ef 100644
--- a/core/statsmanager.lua
+++ b/core/statsmanager.lua
@@ -23,29 +23,21 @@ if stats_interval then
return f(name);
end
- local mark_collection_start = measure("duration", "stats.collection_time");
- local mark_processing_start = measure("duration", "stats.processing_time");
+ local mark_collection_start = measure("times", "stats.collection");
+ local mark_processing_start = measure("times", "stats.processing");
function collect()
local mark_collection_done = mark_collection_start();
changed_stats, stats_extra = {}, {};
- for name, getter in pairs(stats.get_stats()) do
+ for stat_name, getter in pairs(stats.get_stats()) do
local type, value, extra = getter();
- local stat_name = name..":"..type;
local old_value = latest_stats[stat_name];
latest_stats[stat_name] = value;
if value ~= old_value then
changed_stats[stat_name] = value;
end
if extra then
- print(stat_name, extra)
stats_extra[stat_name] = extra;
- if type == "duration" then
- local rate = extra.rate;
- local rate_name = name..":rate";
- latest_stats[rate_name] = rate;
- changed_stats[rate_name] = rate;
- end
end
end
mark_collection_done();