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
commit661e0a647a2eef03814227ee1b1e5292bcdf5898 (patch)
tree0eb96a3dc21fa2b13b00d887a72ef96a811c2f3e /core/statsmanager.lua
parent1714d99f76f508234087c8a2cfc35667b1c38953 (diff)
downloadprosody-661e0a647a2eef03814227ee1b1e5292bcdf5898.tar.gz
prosody-661e0a647a2eef03814227ee1b1e5292bcdf5898.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();