def simulate(self):
"""
Do simulation for all enabled components.
"""
timers = []
for compID in self.componentsID:
t1 = time.perf_counter()
self.simulate_component(compID)
t2 = time.perf_counter()
timers.append((compID, t1, t2))
logger.info("==================================================")
logger.info(">>> Time usage <<<")
logger.info("==================================================")
for compID, t1, t2 in timers:
logger.info("%s : %.1f [min]" % (compID, (t2-t1)/60))
logger.info("--------------------------------------------------")
评论列表
文章目录