(results: dict, output_dir: str)
| 210 | |
| 211 | |
| 212 | def render_plot(results: dict, output_dir: str) -> str: |
| 213 | fig, axes = plt.subplots(2, 3, figsize=(16.5, 9.0)) |
| 214 | fig.suptitle( |
| 215 | "Java Xlang Serialization Throughput", |
| 216 | fontsize=15, |
| 217 | fontweight="normal", |
| 218 | y=0.955, |
| 219 | ) |
| 220 | |
| 221 | for index, (ax, datatype) in enumerate(zip(axes.flat, DATATYPE_ORDER)): |
| 222 | plot_group(ax, results, datatype) |
| 223 | if index % 3 == 0: |
| 224 | ax.set_ylabel("Throughput (ops/sec)", labelpad=10) |
| 225 | |
| 226 | fig.tight_layout(rect=[0.02, 0.02, 0.995, 0.965], w_pad=1.2, h_pad=1.25) |
| 227 | output_path = os.path.join(output_dir, "throughput.png") |
| 228 | save_benchmark_figure(fig, output_path) |
| 229 | plt.close(fig) |
| 230 | return output_path |
| 231 | |
| 232 | |
| 233 | def format_table_value(value: float) -> str: |
no test coverage detected