-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Johannes Wünsche
committed
Apr 9, 2024
1 parent
6da8935
commit 2a58dcb
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
betree/haura-benchmarks/haura-plots/haura_plots/ycsb_plots.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
|
||
def plot_c(path): | ||
if not os.path.exists(f"{path}/ycsb_c.csv"): | ||
return | ||
|
||
data = pd.read_csv(f"{path}/ycsb_c.csv"); | ||
fig, ax = plt.subplots() | ||
# op / s | ||
first = data["ops"][0] / (data["time_ns"][0] / 10**9) | ||
second = data["ops"][1] / (data["time_ns"][1] / 10**9) | ||
if first < second / 2: | ||
first = second / 2 | ||
optimal_scaling = [x * first for x in data["threads"]] | ||
ax.plot(data["threads"], optimal_scaling, linestyle=":", label="Optimal", color='grey') | ||
ax.bar(data["threads"], data["ops"] / (data["time_ns"] / 10**9)) | ||
ax.set_ylabel("Throughput [op/s]") | ||
ax.set_title("YCSB-C Scaling Behavior") | ||
ax.set_xlabel("Threads [#]") | ||
fig.legend() | ||
fig.savefig(f"{path}/ycsb_c.svg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters