#!/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: {} ".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.")