1
0
Fork 0

Add "Time per bit"-graphs.

This commit is contained in:
Casper V. Kristensen 2019-12-16 05:17:51 +01:00
parent 6fc32854b4
commit 10f6bb5ac2
9 changed files with 9 additions and 9 deletions

View file

@ -187,7 +187,7 @@ def plot_scheme_heatmap(results: list, title: str, bandwidth: int):
results, results,
x_func=lambda r: r["database_size"], x_func=lambda r: r["database_size"],
y_func=lambda r: r["block_size"], y_func=lambda r: r["block_size"],
z_func=lambda r: with_bandwidth(r, bandwidth) z_func=lambda r: with_bandwidth(r, bandwidth) #/ r["block_size"]
) )
im, cbar = util.heatmap( im, cbar = util.heatmap(
@ -208,13 +208,13 @@ def plot_old_vs_new_heatmap(all_results: dict, old_func: callable, new_func: cal
old_func(all_results), old_func(all_results),
x_func=lambda r: r["database_size"], x_func=lambda r: r["database_size"],
y_func=lambda r: r["block_size"], y_func=lambda r: r["block_size"],
z_func=lambda r: with_bandwidth(r, 10) z_func=lambda r: with_bandwidth(r, 10) #/ r["block_size"]
) )
data_new, x_labels, y_labels = matrixify( data_new, x_labels, y_labels = matrixify(
new_func(all_results), new_func(all_results),
x_func=lambda r: r["database_size"], x_func=lambda r: r["database_size"],
y_func=lambda r: r["block_size"], y_func=lambda r: r["block_size"],
z_func=lambda r: with_bandwidth(r, 10) z_func=lambda r: with_bandwidth(r, 10) #/ r["block_size"]
) )
def calc(i, j): def calc(i, j):
@ -257,7 +257,7 @@ def main():
# ... with simulated bandwidth, e.g. estimated total real time # ... with simulated bandwidth, e.g. estimated total real time
plot_3x_with_simulated_bandwidth( plot_3x_with_simulated_bandwidth(
filter_results(clean_results(load_results("results_combined.log")), lambda r: r["block_size"] == 1), filter_results(clean_results(load_results("results_combined.log")), lambda r: r["block_size"] == 1),
title="Total Time with Simulated Bandwidth - 1-bit Block Size" title="Time per bit with Simulated Bandwidth - 1-bit Block Size"
) )
# CPU Time per bit as a function of block/database-ratio # CPU Time per bit as a function of block/database-ratio
@ -294,19 +294,19 @@ def main():
# 2D Heatmap of CPU time for Simple/XOR/Balanced XOR - varying both database size and block size # 2D Heatmap of CPU time for Simple/XOR/Balanced XOR - varying both database size and block size
plot_scheme_heatmap( plot_scheme_heatmap(
clean_results(load_results("results_fast_var-bs_var-db.log"))["Send_All"], clean_results(load_results("results_fast_var-bs_var-db.log"))["Send_All"],
title="Total Simulated Time Heatmap: Send All - Varying Database Size and Block Size - 10Mbit/s", title="Simulated Time per bit Heatmap: Send All - Varying Database Size and Block Size - 10Mbit/s",
bandwidth=10 bandwidth=10
) )
plt.close() plt.close()
plot_scheme_heatmap( plot_scheme_heatmap(
clean_results(load_results("results_fast_var-bs_var-db.log"))["XOR"], clean_results(load_results("results_fast_var-bs_var-db.log"))["XOR"],
title="Total Simulated Time Heatmap: XOR - Varying Database Size and Block Size - 10Mbit/s", title="Simulated Time per bit Heatmap: XOR - Varying Database Size and Block Size - 10Mbit/s",
bandwidth=10 bandwidth=10
) )
plt.close() plt.close()
plot_scheme_heatmap( plot_scheme_heatmap(
clean_results(load_results("results_fast_var-bs_var-db.log"))["Balanced_XOR"], clean_results(load_results("results_fast_var-bs_var-db.log"))["Balanced_XOR"],
title="Total Simulated Time Heatmap: Balanced XOR - Varying Database Size and Block Size - 10Mbit/s", title="Simulated Time per bit Heatmap: Balanced XOR - Varying Database Size and Block Size - 10Mbit/s",
bandwidth=10 bandwidth=10
) )
plt.close() plt.close()
@ -316,14 +316,14 @@ def main():
clean_results(load_results("results_fast_var-bs_var-db.log")), clean_results(load_results("results_fast_var-bs_var-db.log")),
old_func=lambda rs: rs["Send_All"], old_func=lambda rs: rs["Send_All"],
new_func=lambda rs: rs["Balanced_XOR"], new_func=lambda rs: rs["Balanced_XOR"],
title="Total Simulated Time Heatmap: Send All vs Balanced XOR - Varying Database Size and Block Size - 10 Mbit/s" title="Simulated Time per bit Heatmap: Send All vs Balanced XOR - Varying Database Size and Block Size - 10 Mbit/s"
) )
plt.close() plt.close()
plot_old_vs_new_heatmap( plot_old_vs_new_heatmap(
clean_results(load_results("results_fast_var-bs_var-db.log")), clean_results(load_results("results_fast_var-bs_var-db.log")),
old_func=lambda rs: rs["XOR"], old_func=lambda rs: rs["XOR"],
new_func=lambda rs: rs["Balanced_XOR"], new_func=lambda rs: rs["Balanced_XOR"],
title="Total Simulated Time Heatmap: XOR vs Balanced XOR - Varying Database Size and Block Size - 10 Mbit/s" title="Simulated Time per bit Heatmap: XOR vs Balanced XOR - Varying Database Size and Block Size - 10 Mbit/s"
) )
plt.close() plt.close()