本文整理汇总了Python中Simulator.Simulator.run_simulator方法的典型用法代码示例。如果您正苦于以下问题:Python Simulator.run_simulator方法的具体用法?Python Simulator.run_simulator怎么用?Python Simulator.run_simulator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simulator.Simulator
的用法示例。
在下文中一共展示了Simulator.run_simulator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from Simulator import Simulator [as 别名]
# 或者: from Simulator.Simulator import run_simulator [as 别名]
sys.stdout = Logger.Logger()
# preparing to setup Logging
logging.basicConfig(filename=os.path.join(os.path.join(os.path.curdir, PackageFile.LoGDirectory),
'Logging_Log_'+str(time.time())+'.log'), level=logging.DEBUG)
logging.info('Starting logging...')
####################################################################
misc.generate_file_directories()
misc.draw_logo()
misc.generate_configfile()
####################################################################
# Initialization of the system
tg, ag, shmu, noc_rg, CriticalRG, NonCriticalRG, pmcg = SystemInitialization.initialize_system(logging)
# just to have a sense of how much time we are spending in each section
print ("===========================================")
system_starting_time = time.time()
print ("\033[92mTIME::\033[0m SYSTEM STARTS AT:"+str(round(system_starting_time-program_start_time)) +
" SECONDS AFTER PROGRAM START...")
if Config.enable_simulator:
Simulator.run_simulator(Config.ProgramRunTime, tg, ag, shmu, noc_rg, CriticalRG, NonCriticalRG, logging)
logging.info('Logging finished...')
if Config.MemoryProfiler:
print("===========================================")
print(" Reporting Memory Usage")
print("===========================================")
tr.print_diff()
print("===========================================")