new mapgen_helper metrics

This commit is contained in:
FaceDeer 2020-02-08 23:10:37 -07:00
parent 18051ce3a6
commit e2c6507e5f
6 changed files with 10 additions and 31 deletions

View File

@ -137,11 +137,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] lava sea mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] lava sea took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns lava sea", time_taken)
end)

View File

@ -102,13 +102,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] oil sea mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] oil sea took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns oil sea", time_taken)
end)
minetest.register_ore({

View File

@ -77,12 +77,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
--write it to world
vm:write_to_map()
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns surface tunnels] "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns surface tunnels] took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns surface tunnels", time_taken)
end)

View File

@ -555,11 +555,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end
local chunk_generation_time = math.ceil((os.clock() - t_start) * 1000) --grab how long it took
if chunk_generation_time < 1000 then
minetest.log("info", "[df_caverns] underworld mapblock generation took "..chunk_generation_time.." ms") --tell people how long
else
minetest.log("warning", "[df_caverns] underworld took "..chunk_generation_time.." ms to generate map block "
.. minetest.pos_to_string(minp) .. minetest.pos_to_string(maxp))
end
local time_taken = os.clock() - t_start -- how long this chunk took, in seconds
mapgen_helper.record_time("df_caverns underworld", time_taken)
end)

@ -1 +1 @@
Subproject commit 9c7347691d451f6eee329cd8f7e23ccbd27bd298
Subproject commit ba8c4a92472bc7c53708af9fade8857b44dd6f56

@ -1 +1 @@
Subproject commit 1abfc23dd369899c1b6c4888799bcdc4525558a4
Subproject commit 4b0ae3bce730cc88e324907e7695e719c74c913e