def generate_times(self): say('Generating plot: %s vs Time (s)' % self.xlabel) plots = ["'%s' title '%s' pt %d" % (f, f.executable, pt) for f, pt in zip(self.files, cycle(self.POINTS))] gnuplot([ 'set ylabel "Time (s)"', 'set xlabel "%s"' % self.xlabel, 'set key below', "set term pdf color", 'set output "%s_time.pdf"' % self.name, "plot %s" % ', '.join(plots) ])
def generate_speedup(self): if len(self.files) < 2: return say("Too few stats. Skipping speedup plot...") original = self.files[0] plots = ["'< paste %s %s' using 1:($2/$4) title '%s/%s' lc %d" % (original, f, original.executable, f.executable, color) for f, color in zip(self.files[1:], cycle(self.COLORS))] say("Generating plot: Speedup") gnuplot([ 'set ylabel "Speedup"', 'set xlabel "%s"' % self.xlabel, 'set key below', "set term pdf color", 'set output "%s_speedup.pdf"' % self.name, "plot %s" % ', '.join(plots) ])