-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
39 lines (29 loc) · 1.2 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import matplotlib.pyplot as plt
from benchmark import Benchmark
def main() -> None:
fig, graph = plt.subplots(2, 2)
benchmark = Benchmark(shape=[64, 1080, 1920], chunks=[64, 540, 960])
benchmark.run_all_tests(
append_test_gigabytes=50, write_test_gigabytes=5,
append_graph=graph[1][0], append_avg_graph=graph[1][1],
write_graph=graph[0][0], write_avg_graph=graph[0][1]
)
# setting up graph for append tests
graph[1][0].set_xlabel("Write Number")
graph[1][0].set_title("Continuous Append Test")
graph[1][0].legend()
# setting up graphs for write tests
graph[0][0].set_xlabel("Data Size (GB)")
graph[0][0].set_title("Continuous Write Test")
graph[0][0].legend()
# setting up graphs for average bandwidth
graph[0][1].set_title("Average Bandwidth:\nContinuous Write Test")
graph[1][1].set_title("Average Bandwidth:\nContinuous Append Test")
for graph in fig.get_axes():
graph.set_ylabel("Bandwidth (GBps)")
graph.grid()
fig.canvas.manager.set_window_title(f'shape: {benchmark.shape}, chunks: {benchmark.chunks}')
plt.tight_layout()
plt.show()
if __name__ == "__main__":
main()