Skip to content

Commit

Permalink
benchmark: sort sizes in-place
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Wünsche committed Feb 20, 2024
1 parent d729ed7 commit f1e017b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions betree/haura-benchmarks/haura-plots/haura_plots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,15 @@ def plot_evaluation_latency(path, variant):
size = reads['size'].to_numpy()
latency = reads['latency_ns'].to_numpy()
p = np.polynomial.Polynomial.fit(size, latency, 1)
ax.plot(np.sort(size), p(np.sort(size)), linestyle=':', label='read trend', color='black')
size.sort()
ax.plot(size, p(size), linestyle=':', label='read trend', color='black')
if len(writes) > 0:
ax.scatter(writes['size'], writes['latency_ns'], marker='.', label="write")
size = writes['size'].to_numpy()
latency = writes['latency_ns'].to_numpy()
p = np.polynomial.Polynomial.fit(size, latency, 1)
ax.plot(np.sort(size), p(np.sort(size)), linestyle='-.', label='write trend', color='black')
size.sort()
ax.plot(size, p(size), linestyle='-.', label='write trend', color='black')
xticks = np.arange(0, 12 * 1024 * 1024 + 1, 2 * 1024 * 1024)
ax.set_xticks(xticks, [int(x / 1024) for x in xticks])
ax.set_xlabel("Size in KiB")
Expand Down

0 comments on commit f1e017b

Please sign in to comment.