aboutsummaryrefslogtreecommitdiffstats
path: root/docker/benchmarking/plotperf.py.patch
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-05-09 17:15:33 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2021-05-10 11:48:51 +0200
commit1c376f363a95d040676ea3f245e55ac3f40710a4 (patch)
tree740fb6eded66fb37a738709e12e67ef83a013a4c /docker/benchmarking/plotperf.py.patch
parente252bccbc9cdbad66ab2152cf156a9a36eb1a565 (diff)
Benchmark Kubernetes Networking Performance
https://github.com/kubernetes/perf-tests/tree/master/network/benchmarks/netperf Change-Id: I6facd567f1c52c5949b53484a1fb107dcf34d622 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 3b5c1b115e234d636cb4f2a17d27ced872fee924)
Diffstat (limited to 'docker/benchmarking/plotperf.py.patch')
-rw-r--r--docker/benchmarking/plotperf.py.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/docker/benchmarking/plotperf.py.patch b/docker/benchmarking/plotperf.py.patch
new file mode 100644
index 00000000..45a64e1e
--- /dev/null
+++ b/docker/benchmarking/plotperf.py.patch
@@ -0,0 +1,42 @@
+--- plotperf.py.orig 2021-05-09 10:42:17.858983226 +0200
++++ plotperf.py 2021-05-09 10:43:09.410934186 +0200
+@@ -18,11 +18,13 @@
+ # Generates matplotlib line and bar charts from the netperf.csv raw data file
+ #
+
++from __future__ import print_function
++from builtins import range
+ try:
+ import matplotlib.pyplot as plt
+-except Exception, e:
++except Exception as e:
+ # Translate the traceback to a more friendly error message
+- print "Exception (%s) while importing matplotlib - install with apt-get install python-matplotlib (or equivalent package manager)" % e
++ print("Exception (%s) while importing matplotlib - install with apt-get install python-matplotlib (or equivalent package manager)" % e)
+ raise
+
+ import numpy
+@@ -93,7 +95,7 @@
+ for ext in [ "png", "svg" ]:
+ fname = os.path.join(options.outputdir, "{0}.{1}".format(options.suffix, ext))
+ plt.savefig(fname, dpi=100)
+- print "Saved {0}".format(fname)
++ print("Saved {0}".format(fname))
+
+ barlabels = []
+ barvalues = []
+@@ -105,7 +107,7 @@
+ barvalues.append(float(data[n][1]))
+
+ plt.clf()
+- plt.barh(bottom=range(0, len(data)-1),
++ plt.barh(list(range(0, len(data)-1)),
+ height=0.5,
+ width=barvalues,
+ align='center')
+@@ -117,4 +119,4 @@
+ for ext in [ "png", "svg" ]:
+ fname = os.path.join(options.outputdir, "{0}.bar.{1}".format(options.suffix, ext))
+ plt.savefig(fname, dpi=100)
+- print "Saved {0}".format(fname)
++ print("Saved {0}".format(fname))