Skip to content

Commit

Permalink
Merge pull request #7 from WardBrian/startup
Browse files Browse the repository at this point in the history
Show startup times
  • Loading branch information
magland authored Jan 14, 2025
2 parents 193fc60 + 44a3e0e commit 3e65a41
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion plot_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
wavelets = sorted(set(b['wavelet'] for b in data['benchmarks']))

# Set up the plot
fig, axes = plt.subplots(2, 1, figsize=(12, 10))
fig, axes = plt.subplots(len(sizes) + 1, 1, figsize=(12, 10))
if include_discrete_wavelets:
fig.suptitle('Wasmlets vs Pywavelets vs Discrete-Wavelets Performance Comparison')
else:
Expand Down Expand Up @@ -72,5 +72,21 @@
ax.legend()
ax.grid(True, alpha=0.3)


ax = axes[-1]

wasmlets_load = data['initializationTimings']['wasmlets']
pywavelets_load = data['initializationTimings']['pyodide']
ax.bar(0, wasmlets_load, width=bar_width, label='Wasmlets', color='skyblue')
ax.bar(1, pywavelets_load, width=bar_width, label='Pyodide+Pywt', color='coral')
ax.set_xticks([0, 1])
ax.set_xticklabels(['Wasmlets', 'Pyodide + Pywavelets'])
# log plot
ax.set_yscale('log')
ax.set_ylabel('Time (log ms)')
ax.legend()
ax.set_title('Startup')


plt.tight_layout()
plt.savefig('output/benchmark.png', dpi=300, bbox_inches='tight')

0 comments on commit 3e65a41

Please sign in to comment.