(results: dict, output_dir: str)
| 194 | |
| 195 | |
| 196 | def save_summary_plot(results: dict, output_dir: str) -> str: |
| 197 | figure, axes = plt.subplots(2, 3, figsize=(16.5, 9.0)) |
| 198 | figure.suptitle( |
| 199 | "Dart Serialization Throughput", fontsize=15, fontweight="normal", y=0.955 |
| 200 | ) |
| 201 | |
| 202 | for index, (ax, data_type) in enumerate(zip(axes.flat, DATA_TYPES)): |
| 203 | plot_summary_group(ax, results, data_type) |
| 204 | if index % 3 == 0: |
| 205 | ax.set_ylabel("Throughput (ops/sec)", labelpad=10) |
| 206 | |
| 207 | figure.tight_layout(rect=[0.02, 0.02, 0.995, 0.965], w_pad=1.2, h_pad=1.25) |
| 208 | |
| 209 | path = os.path.join(output_dir, "throughput.png") |
| 210 | save_benchmark_figure(figure, path) |
| 211 | plt.close(figure) |
| 212 | return path |
| 213 | |
| 214 | |
| 215 | def write_report(payload: dict, results: dict, output_dir: str): |
no test coverage detected