import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('scaling_results.csv')
plt.figure(figsize=(10, 6))
plt.plot(df['threads'], df['throughput'], 'bo-', linewidth=2, markersize=8)
plt.xlabel('Number of Threads')
plt.ylabel('Throughput (ops/sec)')
plt.title('WAL Write Throughput Scaling')
plt.grid(True, alpha=0.3)
ax = plt.gca()
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, p: f'{x:,.0f}'))
plt.xticks(range(1, 11))
plt.tight_layout()
plt.show()
print("Scaling benchmark complete!")
print("Data saved to: scaling_results.csv")