From 0077b672db21e06e75c853bbf4475ba1a5973984 Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sat, 26 Oct 2024 23:46:15 +0200 Subject: [PATCH] update script to have a gap between benchmarks --- wasm/test/script.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wasm/test/script.py b/wasm/test/script.py index 5f783d9d6..30218c63e 100755 --- a/wasm/test/script.py +++ b/wasm/test/script.py @@ -21,15 +21,16 @@ data[benchmark_name] = (commands, means) # Prepare the plot -fig, ax = plt.subplots(figsize=(10, 6)) +fig, ax = plt.subplots(figsize=(12, 6)) benchmarks = list(data.keys()) commands = data[benchmarks[0]][0] # Get the list of tools from the first benchmark num_benchmarks = len(benchmarks) num_commands = len(commands) -# Set bar width and positions -bar_width = 0.2 -x = np.arange(num_benchmarks) +# Set bar width and positions with additional space between groups +bar_width = 0.15 +group_gap = 0.4 # Gap between benchmark groups +x = np.arange(num_benchmarks) * (num_commands * bar_width + group_gap) # Plot bars for each command for i, command in enumerate(commands): @@ -42,7 +43,7 @@ ax.set_xticklabels(benchmarks, rotation=45, ha='right') ax.set_ylabel('Execution Time (s)') ax.legend(title="Tool") -plt.title("Benchmark Execution Times for Various Tools") +plt.title("Benchmark Execution Times for Various OCaml compilers") plt.tight_layout() # Save as SVG