diff options
author | Matthew Wild <mwild1@gmail.com> | 2015-01-21 01:26:06 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2015-01-21 01:26:06 +0000 |
commit | 661e0a647a2eef03814227ee1b1e5292bcdf5898 (patch) | |
tree | 0eb96a3dc21fa2b13b00d887a72ef96a811c2f3e /core/statsmanager.lua | |
parent | 1714d99f76f508234087c8a2cfc35667b1c38953 (diff) | |
download | prosody-661e0a647a2eef03814227ee1b1e5292bcdf5898.tar.gz prosody-661e0a647a2eef03814227ee1b1e5292bcdf5898.zip |
statsmanager, util.statistics: API changes, remove debugging
Diffstat (limited to 'core/statsmanager.lua')
-rw-r--r-- | core/statsmanager.lua | 14 |
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(); |