Skip to content

Commit ecbe374

Browse files
committed
Add throughput labels
1 parent a516232 commit ecbe374

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bench/large-tree-store.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,14 @@ def create_comparison_plot(sizes_mb, tstore_results, h5py_results, zarr_results)
529529
ax1.text(bar.get_x() + bar.get_width()/2., height + height*0.01,
530530
f'{time_val:.2f}s', ha='center', va='bottom', fontweight='bold')
531531

532+
# Add write throughput annotations
533+
for i, time_val in enumerate(times):
534+
if time_val > 0:
535+
write_throughput = total_data_mb / (time_val * 1024)
536+
ax1.text(i, time_val / 2, f'{write_throughput:.2f} GB/s',
537+
ha='center', va='center', fontweight='bold',
538+
bbox=dict(boxstyle='round,pad=0.3', facecolor='white', alpha=0.8))
539+
532540
# Plot 2: Total Read Time (top-right)
533541
bars2 = ax2.bar(backends, read_times, color=plot_colors, alpha=0.8, edgecolor='black', linewidth=0.5)
534542
ax2.set_title('Total Read Time', fontsize=14, fontweight='bold')
@@ -541,6 +549,14 @@ def create_comparison_plot(sizes_mb, tstore_results, h5py_results, zarr_results)
541549
ax2.text(bar.get_x() + bar.get_width()/2., height + height*0.01,
542550
f'{read_val:.2f}s', ha='center', va='bottom', fontweight='bold')
543551

552+
# Add read throughput annotations
553+
for i, read_val in enumerate(read_times):
554+
if read_val > 0:
555+
read_throughput = total_data_mb / (read_val * 1024)
556+
ax2.text(i, read_val / 2, f'{read_throughput:.2f} GB/s',
557+
ha='center', va='center', fontweight='bold',
558+
bbox=dict(boxstyle='round,pad=0.3', facecolor='white', alpha=0.8))
559+
544560
# Plot 3: Access Time (bottom-left)
545561
bars3 = ax3.bar(backends, access_times, color=plot_colors, alpha=0.8, edgecolor='black', linewidth=0.5)
546562
ax3.set_title('Average Access Time', fontsize=14, fontweight='bold')

0 commit comments

Comments
 (0)