better profiling
This commit is contained in:
parent
075001a2d5
commit
384079ad73
|
@ -1,11 +1,13 @@
|
|||
from blunderboard.blunderevaluator import BlunderEvaluator
|
||||
from blunderboard.boardreader import BoardReader
|
||||
from blunderboard.movegenerator import MoveGenerator
|
||||
from time import sleep
|
||||
import cProfile
|
||||
from pstats import SortKey
|
||||
from time import sleep
|
||||
|
||||
|
||||
def main_content():
|
||||
try:
|
||||
blunder_evaluator = BlunderEvaluator()
|
||||
move_generator = MoveGenerator(blunder_evaluator)
|
||||
reader = BoardReader(move_generator)
|
||||
|
@ -14,7 +16,9 @@ def main_content():
|
|||
while True:
|
||||
reader.scan()
|
||||
sleep(0.1)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
cProfile.runctx("main_content()", globals(), locals(), filename=__file__)
|
||||
cProfile.runctx("main_content()", globals(), locals(), sort=SortKey.CUMULATIVE)
|
||||
|
|
Loading…
Reference in a new issue