Debug: Add test to measure time taken for level.generateLights
This commit is contained in:
parent
8f782ec8c9
commit
cc201158eb
13
test/time_relight.py
Normal file
13
test/time_relight.py
Normal 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))
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user