Debug: Add test to measure time taken for level.generateLights

This commit is contained in:
David Vierra 2012-10-28 15:05:19 -10:00
parent 8f782ec8c9
commit cc201158eb

13
test/time_relight.py Normal file
View File

@ -0,0 +1,13 @@
import mclevel
from timeit import timeit
#import logging
#logging.basicConfig(level=logging.INFO)
path = "testfiles\\AnvilWorld"
world = mclevel.fromFile(path)
print "Relight: %d chunks in %.02f seconds" % (world.chunkCount, timeit(lambda: world.generateLights(world.allChunks), number=1))