Example #1
0
    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)
Example #2
0
 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)
Example #3
0
 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])
Example #4
0
def main():
    # parse command line
    parser = argparse.ArgumentParser(description="Display the load of each processor.")
    parser.add_argument("jobsCSV", help="The name of the CSV file which contains jobs information")
    parser.add_argument(
        "--output",
        "-o",
        help="The output file (format depending on the given extension, pdf" "is RECOMMENDED). For example: figure.pdf",
    )
    args = parser.parse_args()

    j = JobSet.from_csv(args.jobsCSV)  # create data structure from input args
    fig = plt.figure()  # create figure
    ax = fig.gca()  # extract axes
    plot_load(j, ax, str(args.jobsCSV))  # build visualization

    # show figure
    if args.output is not None:
        plt.savefig(args.output)
    else:
        plt.show()
Example #5
0
def main():
    # parse command line
    parser = argparse.ArgumentParser(
        description='Display the load of each processor.')
    parser.add_argument(
        'jobsCSV',
        help='The name of the CSV file which contains jobs information')
    parser.add_argument(
        '--output',
        '-o',
        help='The output file (format depending on the given extension, pdf'
        'is RECOMMENDED). For example: figure.pdf')
    args = parser.parse_args()

    j = JobSet.from_csv(args.jobsCSV)  # create data structure from input args
    fig = plt.figure()  # create figure
    ax = fig.gca()  # extract axes
    plot_load(j, ax, str(args.jobsCSV))  # build visualization

    # show figure
    if args.output is not None:
        plt.savefig(args.output)
    else:
        plt.show()
Example #6
0
    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)