Skip to content

Commit

Permalink
update script to have a gap between benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Oct 26, 2024
1 parent 1bf2977 commit 0077b67
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions wasm/test/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down

0 comments on commit 0077b67

Please sign in to comment.