def plot(self, normalize=False, with_details=False, time_scale=False): """ Plot workload general informations. :args with_details: if True show the job submission, start and finish time (Warning: don't use this on large traces. """ nrows = 2 if with_details: nrows = nrows + 1 _, axe = plt.subplots(nrows=nrows, sharex=True) visu.plot_load(self.utilisation, self.MaxProcs, time_scale=time_scale, UnixStartTime=self.UnixStartTime, TimeZoneString=self.TimeZoneString, load_label="utilisation", ax=axe[0], normalize=normalize) visu.plot_load(self.queue, self.MaxProcs, time_scale=time_scale, UnixStartTime=self.UnixStartTime, TimeZoneString=self.TimeZoneString, load_label="queue", ax=axe[1], normalize=normalize) if with_details: visu.plot_job_details(self.df, self.MaxProcs, time_scale=time_scale, time_offset=self.UnixStartTime)
def plot(self, normalize=False, with_details=False, time_scale=False, title=None): nrows = 2 if with_details: nrows = nrows + 2 fig, axe = plt.subplots(nrows=nrows, sharex=True) if title: fig.suptitle(title, fontsize=16) visu.plot_load(self.utilisation, self.MaxProcs, load_label="utilisation", ax=axe[0], normalize=normalize, time_scale=time_scale) visu.plot_load(self.queue, self.MaxProcs, load_label="queue", ax=axe[1], normalize=normalize, time_scale=time_scale) if with_details: visu.plot_job_details(self.df, self.MaxProcs, ax=axe[2], time_scale=time_scale) visu.plot_gantt(self, ax=axe[3], time_scale=time_scale)
def plot(self, normalize=False, with_details=False): nrows = 2 if with_details: nrows = nrows + 2 _, axe = plt.subplots(nrows=nrows, sharex=True) visu.plot_load(self.utilisation, self.MaxProcs, load_label="utilisation", ax=axe[0], normalize=normalize) visu.plot_load(self.queue, self.MaxProcs, load_label="queue", ax=axe[1], normalize=normalize) if with_details: visu.plot_job_details(self.df, self.MaxProcs, ax=axe[2]) self.gantt(ax=axe[3])
def plot(self, normalize=False, with_details=False): """ Plot workload general informations. :args with_details: if True show the job submission, start and finish time (Warning: don't use this on large traces. """ nrows = 2 if with_details: nrows = nrows + 1 _, axe = plt.subplots(nrows=nrows, sharex=True) visu.plot_load(self.utilisation, self.MaxProcs, time_scale=True, UnixStartTime=self.UnixStartTime, TimeZoneString=self.TimeZoneString, load_label="utilisation", ax=axe[0], normalize=normalize) visu.plot_load(self.queue, self.MaxProcs, time_scale=True, UnixStartTime=self.UnixStartTime, TimeZoneString=self.TimeZoneString, load_label="queue", ax=axe[1], normalize=normalize) if with_details: visu.plot_job_details(self.df, self.MaxProcs, time_scale=True, time_offset=self.UnixStartTime)
fig, axes = plt.subplots(nrows=5, ncols=1, sharex=True) w = workload.Workload.from_csv(arguments["<swf_file1>"]) w0 = workload.Workload.from_csv(arguments["<swf_file2>"]) visu.plot_series_comparison( { arguments["<swf_file1>"]: w.utilisation.load, arguments["<swf_file2>"]: w0.utilisation.load }, axes[0], "Utilisation comparison") visu.plot_series_comparison( { arguments["<swf_file1>"]: w.queue.load, arguments["<swf_file2>"]: w0.queue.load }, axes[1], "Queue comparison") visu.plot_job_details(w.df, 100, axes[2], arguments["<swf_file1>"]) visu.plot_job_details(w0.df, 100, axes[3], arguments["<swf_file2>"]) visu.plot_series("waiting_time", { arguments["<swf_file1>"]: w, arguments["<swf_file2>"]: w0 }, axes[4]) plt.tight_layout(True) plt.legend() plt.show()
from evalys import workload from docopt import docopt #retrieving arguments arguments = docopt(__doc__, version='1.0.0rc2') fig, axes = plt.subplots(nrows=5, ncols=1, sharex=True) w = workload.Workload.from_csv(arguments["<swf_file1>"]) w0 = workload.Workload.from_csv(arguments["<swf_file2>"]) visu.plot_series_comparison({arguments["<swf_file1>"]: w.utilisation, arguments["<swf_file2>"]: w0.utilisation}, axes[0], "Utilisation comparison") visu.plot_series_comparison({arguments["<swf_file1>"]: w.queue, arguments["<swf_file2>"]: w0.queue}, axes[1], "Queue comparison") visu.plot_job_details(w.df, 100, axes[2], arguments["<swf_file1>"]) visu.plot_job_details(w0.df, 100, axes[3], arguments["<swf_file2>"]) visu.plot_series("waiting_time", {arguments["<swf_file1>"]: w, arguments["<swf_file2>"]: w0}, axes[4]) plt.tight_layout(True) plt.legend() plt.show()