core/statsmanager.lua
changeset 11510 9a3ebdd65f9c
parent 10888 6992c4be1a19
child 11519 10d13e0554f9
--- 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