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

Function generate_plots

benchmarks/python/benchmark_report.py:212–231  ·  view source on GitHub ↗
(data, output_dir: Path)

Source from the content-addressed store, hash-verified

210
211
212def 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
234def generate_markdown_report(raw, data, sizes, output_dir: Path, plot_prefix: str):

Callers 1

mainFunction · 0.70

Calls 3

save_benchmark_figureFunction · 0.90
closeMethod · 0.45

Tested by

no test coverage detected