aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-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();