def bandwidthGraphs(times, bandwidths, iosTime, iosFin, hostdirs, sizes,
                    units):
    logicalFilename = hostdirs[0][1]
    # each are a file in the host dirs array
    numberOfProcesses = len(hostdirs) - 1
    (dataFile, dataCount) = analysis.scale(sizes[0])
    (indexFile, indexCount) = analysis.scale(sizes[1])
    fig1 = plt.figure()
    ax1 = fig1.add_subplot(2, 1, 1)
    indices = sizes[2]
    title = "Filename: " + logicalFilename + "\nProcessors: " + \
        str(numberOfProcesses) + " Data Size: %.1f%s\nIndex Size: %.1f%s Number Of Indices:%s" \
        % (dataFile, units[dataCount], indexFile, units[indexCount], indices)
    ax1.set_title(title, fontsize=10)
    ax1.plot(times, bandwidths)
    ax1.set_ylabel("Bandwidths in MiB/s", fontsize=10)
    # axis is visible on the io graph
    ax1.get_xaxis().set_visible(False)
    ax2 = fig1.add_subplot(2, 1, 2)
    plot1, = ax2.plot(times, iosTime)
    ax3 = ax2.twinx()
    plot2, = ax3.plot(times, iosFin, 'g')
    ax2.legend([plot1, plot2], ["IOs running", "IOs finished"],
               prop={'size': 8})
    ax2.set_ylabel("Number of IOs", fontsize=10)
    ax2.set_xlabel("Time", fontsize=10)
 def __init__(self, parent, frame, notebook, logicalFile, globalAnnotations,\
             hostdirs, sizes):
     self.globalAnnotations = globalAnnotations
     self.frame = frame
     self.notebook = notebook
     self.logicalFile = logicalFile
     save = wx.Button(parent, id=wx.ID_ANY, label="Save All to PDF")
     save.Bind(wx.EVT_BUTTON, self.onSave)
     clear = wx.Button(parent, id=wx.ID_ANY, label="Clear All Annotations")
     clear.Bind(wx.EVT_BUTTON, self.onClear)
     undo = wx.Button(parent, id=wx.ID_ANY, label="Undo Last Annotation")
     undo.Bind(wx.EVT_BUTTON, self.onUndo)
     mainSizer = wx.BoxSizer(wx.HORIZONTAL)
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(save, 0, wx.ALL)
     sizer.Add(clear, 0, wx.ALL)
     sizer.Add(undo, 0, wx.ALL)
     # add filename text
     (dataFile, dataCount) = analysis.scale(sizes[0])
     (indexFile, indexCount) = analysis.scale(sizes[1])
     units = {0: " B", 1:" KiB", 2:" MiB", 3:" GiB", 4:" TiB", 5:" PiB"}
     self.text = "Filename: %s\nProcessors: %s \nData Size: %.1f%s\nIndexSize:%.1f%s\nNumber of Indices:%s" % (logicalFile,\
             (len(hostdirs)-1), dataFile, units[dataCount], indexFile, \
             units[indexCount], sizes[2])
     staticText = wx.StaticText(parent, -1, self.text)
     font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD)
     staticText.SetFont(font)
     mainSizer.Add(staticText, 0, wx.ALL)    
     mainSizer.Add(sizer, 0, wx.ALL)
     parent.SetSizer(mainSizer)
Beispiel #3
0
def bandwidthGraphs(times, bandwidths, iosTime, iosFin, hostdirs, sizes, units):
    logicalFilename = hostdirs[0][1]
    # each are a file in the host dirs array
    numberOfProcesses = len(hostdirs) - 1
    (dataFile, dataCount) = analysis.scale(sizes[0])
    (indexFile, indexCount) = analysis.scale(sizes[1])
    fig1 = plt.figure()
    ax1 = fig1.add_subplot(2, 1, 1)
    indices = sizes[2]
    title = (
        "Filename: "
        + logicalFilename
        + "\nProcessors: "
        + str(numberOfProcesses)
        + " Data Size: %.1f%s\nIndex Size: %.1f%s Number Of Indices:%s"
        % (dataFile, units[dataCount], indexFile, units[indexCount], indices)
    )
    ax1.set_title(title, fontsize=10)
    ax1.plot(times, bandwidths)
    ax1.set_ylabel("Bandwidths in MiB/s", fontsize=10)
    # axis is visible on the io graph
    ax1.get_xaxis().set_visible(False)
    ax2 = fig1.add_subplot(2, 1, 2)
    plot1, = ax2.plot(times, iosTime)
    ax3 = ax2.twinx()
    plot2, = ax3.plot(times, iosFin, "g")
    ax2.legend([plot1, plot2], ["IOs running", "IOs finished"], prop={"size": 8})
    ax2.set_ylabel("Number of IOs", fontsize=10)
    ax2.set_xlabel("Time", fontsize=10)
def barGraph(writeBins, units):
    fig3 = plt.figure()
    n = len(writeBins)
    ax = fig3.add_subplot(1, 1, 1)
    ax.set_title("Write Sizes", fontsize=10)
    ax.set_ylabel("Count", fontsize=8)
    maxCount = 0  #this is used to get the yaxis max better fitted
    bins = [0] * n
    for i in xrange(n):
        bins[i] = 2**i  #scale for the bottom bins
        if writeBins[i] > maxCount:
            maxCount = writeBins[i]
    rect = ax.bar(range(n), writeBins)
    width = rect[0].get_width()
    labels = []
    gc.disable()
    for bin in bins:
        if bin != 0:
            (size, count) = analysis.scale(bin)
            labels.append("%.1f%s" % (size, units[count]))
        else:
            labels.append("")
    gc.enable()
    #add the counts to the top of each bar
    for i in xrange(n):
        count = writeBins[i]
        if count == 0:
            pass
        else:
            ax.text(i+width/2, count*1.02, count, ha="center", va="bottom", \
                fontsize=6)
    ax.set_xticks(range(n))
    ax.set_ylim([0, maxCount * 1.07])  #create extra space for text
    ax.set_xticklabels(labels, rotation=90, fontsize=6)
 def plotWriteSizes(self, writeBins):
     n = len(writeBins)
     units = {0: " B", 1:" KiB", 2:" MiB", 3:" GiB", 4:" TiB", 5:" PiB"}
     self.axes.set_ylabel("Count", fontsize=10)
     maxCount = 0
     bins = [0]*n
     for i in xrange(n):
         bins[i] = 2**i
         if writeBins[i] > maxCount:
             maxCount = writeBins[i]
     rect = self.axes.bar(range(n), writeBins)
     labels = []
     for bin in bins:
         if bin != 0:
             (size, count) = analysis.scale(bin)
             labels.append("%.1f%s" % (size, units[count]))
         else:
             labels.append("")
     width = rect[0].get_width()
     for i in xrange(n):
         count = writeBins[i]
         if count == 0:
             pass
         else:
             self.axes.text(i+width/2, count*1.02, count, ha="center", \
                             va="bottom", fontsize=8)
     self.axes.set_xticks(range(n))
     self.axes.set_ylim([0, maxCount*1.07])
     self.axes.set_xticklabels(labels, rotation=90, fontsize=6)
Beispiel #6
0
def barGraph(writeBins, units):
    fig3 = plt.figure()
    n = len(writeBins)
    ax = fig3.add_subplot(1, 1, 1)
    ax.set_title("Write Sizes", fontsize=10)
    ax.set_ylabel("Count", fontsize=8)
    maxCount = 0  # this is used to get the yaxis max better fitted
    bins = [0] * n
    for i in xrange(n):
        bins[i] = 2 ** i  # scale for the bottom bins
        if writeBins[i] > maxCount:
            maxCount = writeBins[i]
    rect = ax.bar(range(n), writeBins)
    width = rect[0].get_width()
    labels = []
    gc.disable()
    for bin in bins:
        if bin != 0:
            (size, count) = analysis.scale(bin)
            labels.append("%.1f%s" % (size, units[count]))
        else:
            labels.append("")
    gc.enable()
    # add the counts to the top of each bar
    for i in xrange(n):
        count = writeBins[i]
        if count == 0:
            pass
        else:
            ax.text(i + width / 2, count * 1.02, count, ha="center", va="bottom", fontsize=6)
    ax.set_xticks(range(n))
    ax.set_ylim([0, maxCount * 1.07])  # create extra space for text
    ax.set_xticklabels(labels, rotation=90, fontsize=6)
Beispiel #7
0
 def __init__(self, parent, frame, notebook, logicalFile, globalAnnotations,\
             hostdirs, sizes):
     self.globalAnnotations = globalAnnotations
     self.frame = frame
     self.notebook = notebook
     self.logicalFile = logicalFile
     save = wx.Button(parent, id=wx.ID_ANY, label="Save All to PDF")
     save.Bind(wx.EVT_BUTTON, self.onSave)
     clear = wx.Button(parent, id=wx.ID_ANY, label="Clear All Annotations")
     clear.Bind(wx.EVT_BUTTON, self.onClear)
     undo = wx.Button(parent, id=wx.ID_ANY, label="Undo Last Annotation")
     undo.Bind(wx.EVT_BUTTON, self.onUndo)
     mainSizer = wx.BoxSizer(wx.HORIZONTAL)
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(save, 0, wx.ALL)
     sizer.Add(clear, 0, wx.ALL)
     sizer.Add(undo, 0, wx.ALL)
     # add filename text
     (dataFile, dataCount) = analysis.scale(sizes[0])
     (indexFile, indexCount) = analysis.scale(sizes[1])
     units = {
         0: " B",
         1: " KiB",
         2: " MiB",
         3: " GiB",
         4: " TiB",
         5: " PiB"
     }
     self.text = "Filename: %s\nProcessors: %s \nData Size: %.1f%s\nIndexSize:%.1f%s\nNumber of Indices:%s" % (logicalFile,\
             (len(hostdirs)-1), dataFile, units[dataCount], indexFile, \
             units[indexCount], sizes[2])
     staticText = wx.StaticText(parent, -1, self.text)
     font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.BOLD)
     staticText.SetFont(font)
     mainSizer.Add(staticText, 0, wx.ALL)
     mainSizer.Add(sizer, 0, wx.ALL)
     parent.SetSizer(mainSizer)
Beispiel #8
0
 def plotWriteSizes(self, writeBins):
     n = len(writeBins)
     units = {
         0: " B",
         1: " KiB",
         2: " MiB",
         3: " GiB",
         4: " TiB",
         5: " PiB"
     }
     self.axes.set_ylabel("Count", fontsize=10)
     maxCount = 0
     bins = [0] * n
     for i in xrange(n):
         bins[i] = 2**i
         if writeBins[i] > maxCount:
             maxCount = writeBins[i]
     rect = self.axes.bar(range(n), writeBins)
     labels = []
     for bin in bins:
         if bin != 0:
             (size, count) = analysis.scale(bin)
             labels.append("%.1f%s" % (size, units[count]))
         else:
             labels.append("")
     width = rect[0].get_width()
     for i in xrange(n):
         count = writeBins[i]
         if count == 0:
             pass
         else:
             self.axes.text(i+width/2, count*1.02, count, ha="center", \
                             va="bottom", fontsize=8)
     self.axes.set_xticks(range(n))
     self.axes.set_ylim([0, maxCount * 1.07])
     self.axes.set_xticklabels(labels, rotation=90, fontsize=6)