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

Function render_plot

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

Source from the content-addressed store, hash-verified

210
211
212def 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
233def format_table_value(value: float) -> str:

Callers 1

mainFunction · 0.70

Calls 3

save_benchmark_figureFunction · 0.90
plot_groupFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected