1 --- plotperf.py.orig 2021-05-09 10:42:17.858983226 +0200
2 +++ plotperf.py 2021-05-09 10:43:09.410934186 +0200
4 # Generates matplotlib line and bar charts from the netperf.csv raw data file
7 +from __future__ import print_function
8 +from builtins import range
10 import matplotlib.pyplot as plt
12 +except Exception as e:
13 # Translate the traceback to a more friendly error message
14 - print "Exception (%s) while importing matplotlib - install with apt-get install python-matplotlib (or equivalent package manager)" % e
15 + print("Exception (%s) while importing matplotlib - install with apt-get install python-matplotlib (or equivalent package manager)" % e)
20 for ext in [ "png", "svg" ]:
21 fname = os.path.join(options.outputdir, "{0}.{1}".format(options.suffix, ext))
22 plt.savefig(fname, dpi=100)
23 - print "Saved {0}".format(fname)
24 + print("Saved {0}".format(fname))
29 barvalues.append(float(data[n][1]))
32 - plt.barh(bottom=range(0, len(data)-1),
33 + plt.barh(list(range(0, len(data)-1)),
38 for ext in [ "png", "svg" ]:
39 fname = os.path.join(options.outputdir, "{0}.bar.{1}".format(options.suffix, ext))
40 plt.savefig(fname, dpi=100)
41 - print "Saved {0}".format(fname)
42 + print("Saved {0}".format(fname))