def main_loop():
global last_map
profiling = True
profiling = False
#import objgraph
if not profiling:
while True:
main()
else:
if os.path.exists("stats"):
if os.path.exists("stats\*"):
os.remove("stats\*")
while True:
currpath = 'stats\mybot-%s.stats' % (turnCounter+1)
cProfile.run('main()', currpath)
# with open("bot." + "debug", "a") as f:
# logger.debug("Baselining at %s" % getframeinfo(currentframe()).lineno)
# objgraph.show_growth(limit=20,file=f)
评论列表
文章目录