Skip to content

Commit

Permalink
Update performance viz graph
Browse files Browse the repository at this point in the history
  • Loading branch information
eriknyquist committed Aug 8, 2022
1 parent b163113 commit d6c4891
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Binary file modified docs/performance_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified extras/performance_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions perf_test/process_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,29 @@ def main():
ax1.get_xaxis().set_major_formatter(matplotlib.ticker.FuncFormatter(lambda x, p: format(int(x), ',')))
ax2.get_yaxis().set_major_formatter(matplotlib.ticker.FormatStrFormatter('%.2f'))

ax1.set_xlabel("Number of entries in table", weight='bold', color='#ffffff')
ax1.set_ylabel("Nanoseconds", weight='bold', color='#ffffff')
ax2.set_ylabel("Load factor", weight='bold', color='#ffffff')
ax1.set_xlabel("Number of entries in table", weight='bold', color='#ffffff', fontsize=12)
ax1.set_ylabel("Nanoseconds", weight='bold', color='#ffffff', fontsize=12)
ax2.set_ylabel("Load factor", weight='bold', color='r', fontsize=12)

ax2.plot(entry_counts, load_factors, color='r', linestyle='dotted', label="Load factor")

ax1.plot(entry_counts, retrieve_times, color='limegreen', label="Average item retrieval time (nanoseconds)")
ax1.plot(entry_counts, badkey_times, color='orange', label="Average time to check for non-existent key (nanoseconds)")
ax1.plot(entry_counts, insert_times, color='magenta', label="Average item insertion time (nanoseconds)")
ax2.legend(bbox_to_anchor=(1,1), loc='upper right', ncol=1)
ax1.legend(bbox_to_anchor=(0,1), loc='upper left', ncol=1)

for text in ax2.legend(bbox_to_anchor=(1,1), loc='upper right', ncol=1).get_texts():
text.set_color('r')


ax2.spines['bottom'].set_color('#ffffff')
ax2.spines['top'].set_color('#ffffff')
ax2.spines['right'].set_color('#ffffff')
ax2.spines['right'].set_color('r')
ax2.spines['left'].set_color('#ffffff')

ax1.tick_params(axis='x', colors='#ffffff')
ax1.tick_params(axis='y', colors='#ffffff')
ax2.tick_params(axis='y', colors='#ffffff')
ax2.tick_params(axis='y', colors='r')

plt.show()

Expand Down

0 comments on commit d6c4891

Please sign in to comment.