예제 #1
0
 def infile_setup(self, yaml):
     #print 'Base memory usage:', (memory() / 1024 ** 2), 'MB'
     self.base_memory = memory()
     self.analysis = analysis = yaml["analysis"]
     analysis["initial_agents"] = analysis["max_agents"] = 1000 
     analysis["max_time"] = 100000 * (self.runs + 1)
예제 #2
0
 def on_exit(self):
     print 'Increased memory usage:', (memory() - self.base_memory) / 1024 ** 2, 'MB'
     print 'Absolute:', (self.base_memory) / 1024 ** 2, 'MB'
     print 'Time:', self.analysis["max_time"]
     print 'Agents:', self.analysis["initial_agents"]
예제 #3
0
 def __init__(self):
     self.steps = 0
     print 'Starting memory usage:', (memory() / 1024 ** 2), 'MB'