From 2102cf269a22e182ce81225a30b606cc28ee0708 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 30 Mar 2013 23:27:31 -0400 Subject: [PATCH] added rudimentary benchmarking output to chunk processing and tree gen calls --- plants_lib/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plants_lib/init.lua b/plants_lib/init.lua index 604f2ef..c6abf93 100644 --- a/plants_lib/init.lua +++ b/plants_lib/init.lua @@ -92,6 +92,7 @@ end function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or_model) return function(minp, maxp, blockseed) + plantslib:dbg("Started this chunk at "..os.clock()) local biome = biomedef plantslib:set_defaults(biome) @@ -185,7 +186,7 @@ function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or end end end - plantslib:dbg("Finished checking generated area.") + plantslib:dbg("Finished this chunk at "..os.clock()) end end @@ -419,13 +420,17 @@ end -- into it. function plantslib:generate_tree(pos, node_or_function_or_model) + plantslib:dbg("Started this tree at "..os.clock()) minetest.env:spawn_tree(pos, node_or_function_or_model) + plantslib:dbg("Finished at "..os.clock()) end -- and this one's for the call used in the growing code function plantslib:grow_tree(pos, node_or_function_or_model) + plantslib:dbg("Started this tree at "..os.clock()) minetest.env:spawn_tree(pos, node_or_function_or_model) + plantslib:dbg("Finished at "..os.clock()) end