From 539f016c1b1a706da2c113435ec60bb39c868f4b Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 13 Aug 2019 19:56:55 +0200 Subject: Better F6 profiler (#8750) Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly) --- src/mapgen/mapgen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mapgen/mapgen.cpp') diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index 2a6bcf347..29131d56e 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -422,7 +422,7 @@ void Mapgen::updateLiquid(UniqueQueue *trans_liquid, v3s16 nmin, v3s16 nm void Mapgen::setLighting(u8 light, v3s16 nmin, v3s16 nmax) { - ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG); + ScopeProfiler sp(g_profiler, "EmergeThread: update lighting", SPT_AVG); VoxelArea a(nmin, nmax); for (int z = a.MinEdge.Z; z <= a.MaxEdge.Z; z++) { @@ -479,7 +479,7 @@ void Mapgen::lightSpread(VoxelArea &a, v3s16 p, u8 light) void Mapgen::calcLighting(v3s16 nmin, v3s16 nmax, v3s16 full_nmin, v3s16 full_nmax, bool propagate_shadow) { - ScopeProfiler sp(g_profiler, "EmergeThread: mapgen lighting update", SPT_AVG); + ScopeProfiler sp(g_profiler, "EmergeThread: update lighting", SPT_AVG); //TimeTaker t("updateLighting"); propagateSunlight(nmin, nmax, propagate_shadow); -- cgit v1.2.3