| 130 | ax.set_ylabel('rows/sec') |
| 131 | |
| 132 | def plot_2d(test, sorted_argnames, ax, title): |
| 133 | assert len(sorted_argnames) == 2 |
| 134 | lines = set(test.args[sorted_argnames[0]]) |
| 135 | ax.set_title(title) |
| 136 | for line in sorted(lines, key=try_as_numeric): |
| 137 | indices = range(len(test.times)) |
| 138 | indices = list(filter(lambda i: test.args[sorted_argnames[0]][i] == line, indices)) |
| 139 | filtered_test = Test() |
| 140 | filtered_test.times = [test.times[i] for i in indices] |
| 141 | filtered_test.args[sorted_argnames[1]] = [test.args[sorted_argnames[1]][i] for i in indices] |
| 142 | plot_1d(filtered_test, sorted_argnames[1], ax, construct_name(sorted_argnames[0], line)) |
| 143 | |
| 144 | def plot_3d(test, sorted_argnames): |
| 145 | assert len(sorted_argnames) == 3 |