| 88 | pylab.title(self.name) |
| 89 | |
| 90 | def plot_rate(self, name): |
| 91 | if not name in self.samples: |
| 92 | return |
| 93 | |
| 94 | x = [] |
| 95 | y = [] |
| 96 | |
| 97 | any_valid_samples = False |
| 98 | |
| 99 | for sample in self.samples[name]: |
| 100 | if sample[1] == 0: |
| 101 | continue |
| 102 | |
| 103 | x.append(sample[0]) |
| 104 | y.append(float(sample[0]) / (float(sample[1]) * 1e-3)) |
| 105 | any_valid_samples = True |
| 106 | |
| 107 | if not any_valid_samples: |
| 108 | return |
| 109 | |
| 110 | pylab.loglog(x, y, marker='o', label=name) |
| 111 | pylab.xlabel("Size") |
| 112 | pylab.ylabel("Rate (values/s)") |
| 113 | pylab.title(self.name) |
| 114 | |
| 115 | def run_benchmark(name, sizes, vs=[]): |
| 116 | report = Report(name) |