blob: dd7b07a6da0738c15fc08576c14e983240d8f2e8 (
plain) (
blame)
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
|
#!/usr/bin/env python3
# Copied from jupyter notebook at 12:42 AM on Sept 13 2022
import numpy
import matplotlib
# Headless backend. Comment this out if you want to use X.
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import sys
if len(sys.argv) < 2:
print("Usage: {} <gpu_pg_overhead_results>".format(sys.argv[0]))
exit(1)
# Load data
gpu_paging_overheads = numpy.loadtxt(sys.argv[1], delimiter="\t", skiprows=1)
# Convert to milliseconds
gpu_paging_overheads = numpy.divide(gpu_paging_overheads, 1000)
# Plot
plt.ylabel("Milliseconds")
plt.xlabel("Overhead")
plt.boxplot(gpu_paging_overheads, labels=["Page-Out\nStart", "Page-Out\nFinish", "Page-In\nStart", "Page-In\nFinish"]);
plt.tight_layout()
plt.savefig("fig11.pdf")
print("Plot saved as fig11.pdf.")
|