# HG changeset patch # User Kim Alvefur # Date 1617744208 -7200 # Node ID 9a3ebdd65f9c06cb2bb103777ca1589d39db42f9 # Parent 61d38c4b749d9ee15508e1f537286e9cb77140f8 core.statsmanager: Cover util.statistics work in processing measurement Zash> Btw, this conditional and loop, shouldn't it be covered by the timing measurement? Zash> Isn't that where all the util.statistics work is done? MattJ> Yeah, it should Zash> ("the", but there's two ... which oneā€½) MattJ> Yeah... not sure :) MattJ> Processing I guess diff -r 61d38c4b749d -r 9a3ebdd65f9c core/statsmanager.lua --- a/core/statsmanager.lua Tue Apr 06 13:27:18 2021 +0200 +++ b/core/statsmanager.lua Tue Apr 06 23:23:28 2021 +0200 @@ -77,6 +77,7 @@ mark_collection_done(); if stats.get_stats then + local mark_processing_done = mark_processing_start(); changed_stats, stats_extra = {}, {}; for stat_name, getter in pairs(stats.get_stats()) do -- luacheck: ignore 211/type @@ -90,7 +91,6 @@ stats_extra[stat_name] = extra; end end - local mark_processing_done = mark_processing_start(); fire_event("stats-updated", { stats = latest_stats, changed_stats = changed_stats, stats_extra = stats_extra }); mark_processing_done(); end