(data, output_dir: Path)
| 210 | |
| 211 | |
| 212 | def generate_plots(data, output_dir: Path): |
| 213 | with plt.rc_context(PLOT_RC_PARAMS): |
| 214 | fig, axes = plt.subplots(2, 3, figsize=(16.5, 9.0)) |
| 215 | for index, (ax, datatype) in enumerate(zip(axes.flat, DATATYPE_ORDER)): |
| 216 | plot_throughput_grid_subplot(ax, data, datatype) |
| 217 | if index % 3 == 0: |
| 218 | ax.set_ylabel("Throughput (ops/sec)", labelpad=10) |
| 219 | |
| 220 | fig.suptitle( |
| 221 | "Python Serialization Throughput", |
| 222 | fontsize=15, |
| 223 | fontweight="normal", |
| 224 | y=0.955, |
| 225 | ) |
| 226 | fig.tight_layout(rect=[0.02, 0.02, 0.995, 0.965], w_pad=1.2, h_pad=1.25) |
| 227 | throughput_path = output_dir / "throughput.png" |
| 228 | save_benchmark_figure(fig, throughput_path) |
| 229 | plt.close() |
| 230 | |
| 231 | return throughput_path |
| 232 | |
| 233 | |
| 234 | def generate_markdown_report(raw, data, sizes, output_dir: Path, plot_prefix: str): |
no test coverage detected