Loading main.py +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ try: except: print(output_stats) # Schedule history pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) schedule_history = pd.DataFrame(sc.get_history()) print(schedule_history) if args.plot: if 'power' in args.plot: pl = Plotter('Time (s)', 'Power (kW)', 'Power History', \ Loading raps/scheduler.py +5 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ class Scheduler: self.replay = kwargs.get('replay') self.policy = Policy(strategy=kwargs.get('schedule')) self.sys_util_history = [] self.history = [] def add_job(self, job): Loading Loading @@ -150,6 +151,7 @@ class Scheduler: # Schedule job self.assign_nodes_to_job(job) self.history.append(dict(id=job.id, time=self.current_time, nodes=job.nodes_required, wall_time=job.wall_time)) if self.debug: scheduled_nodes = summarize_ranges(job.scheduled_nodes) Loading Loading @@ -373,6 +375,9 @@ class Scheduler: if self.debug and timestep % self.config['UI_UPDATE_FREQ'] == 0: print(".", end="", flush=True) def get_history(self): return self.history def get_stats(self): """ Return output statistics """ sum_values = lambda values : sum(x[1] for x in values) Loading Loading
main.py +6 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ try: except: print(output_stats) # Schedule history pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) schedule_history = pd.DataFrame(sc.get_history()) print(schedule_history) if args.plot: if 'power' in args.plot: pl = Plotter('Time (s)', 'Power (kW)', 'Power History', \ Loading
raps/scheduler.py +5 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ class Scheduler: self.replay = kwargs.get('replay') self.policy = Policy(strategy=kwargs.get('schedule')) self.sys_util_history = [] self.history = [] def add_job(self, job): Loading Loading @@ -150,6 +151,7 @@ class Scheduler: # Schedule job self.assign_nodes_to_job(job) self.history.append(dict(id=job.id, time=self.current_time, nodes=job.nodes_required, wall_time=job.wall_time)) if self.debug: scheduled_nodes = summarize_ranges(job.scheduled_nodes) Loading Loading @@ -373,6 +375,9 @@ class Scheduler: if self.debug and timestep % self.config['UI_UPDATE_FREQ'] == 0: print(".", end="", flush=True) def get_history(self): return self.history def get_stats(self): """ Return output statistics """ sum_values = lambda values : sum(x[1] for x in values) Loading