def runAll(self): # create schedule and run it input = self.workload['input'] schedulesummary = self.workload['schedulesummary'] schedule = self.workload['schedule'] executions = self.workload['executions'] self.log.info("") self.log.info("##############################################") self.log.info("# Running " + input) self.log.info("##############################################") self.log.info("") proc = Processor() w = Utils.loadYaml(input) pm = ProcessorMonitor(w) proc.addMonitor(pm) sc = Scheduler(w, proc) sc.run() Utils.dumpSchedule(sc.getSchedule(), schedulesummary) Utils.dumpYaml(sc.getSchedule(), schedule) Utils.dumpYaml(pm.getResults(), executions) # plot the schedule p = Plot(sc.getSchedule(), pm.getResults(), sc.getH(), sc.getI(), self.wid) p.create() # verify the schedule v = Verifier(Utils.loadYaml(executions), sc.getH(), input) v.verifySchedule() return p.getFigure()
def runTasks(): log = logging.getLogger("main") # setup workloads = { 'workload1': { 'input':'input/workload1.yaml', 'schedulesummary':'output/schedule1.txt', 'schedule':'output/schedule1.yaml', 'executions':'output/executions1.yaml' }, 'workload2': { 'input':'input/workload2.yaml', 'schedulesummary':'output/schedule2.txt', 'schedule':'output/schedule2.yaml', 'executions':'output/executions2.yaml' } } for id,workload in workloads.iteritems(): # create schedule and run it input = workload['input'] schedulesummary = workload['schedulesummary'] schedule = workload['schedule'] executions = workload['executions'] log.info("") log.info("##############################################") log.info("# Running " + input) log.info("##############################################") log.info("") proc = Processor() w = Utils.loadYaml(input) pm = ProcessorMonitor(w) proc.addMonitor(pm) sc = Scheduler(w, proc) sc.run() Utils.dumpSchedule(sc.getSchedule(), schedulesummary) Utils.dumpYaml(sc.getSchedule(), schedule) Utils.dumpYaml(pm.getResults(), executions) # plot the schedule p = Plot(sc.getSchedule(), pm.getResults(), sc.getH(), sc.getI(), id) p.create() # verify the schedule v = Verifier(Utils.loadYaml(executions), sc.getH(), input) v.verifySchedule() # show the plot p.show()