MCPcopy Create free account
hub / github.com/apache/fory / save_summary_plot

Function save_summary_plot

benchmarks/dart/benchmark_report.py:196–212  ·  view source on GitHub ↗
(results: dict, output_dir: str)

Source from the content-addressed store, hash-verified

194
195
196def 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
215def write_report(payload: dict, results: dict, output_dir: str):

Callers 1

mainFunction · 0.85

Calls 3

save_benchmark_figureFunction · 0.90
plot_summary_groupFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected