From 4307baf7bcc71ca91da0175e79cdfbf6cc1ad770 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 4 Sep 2009 16:02:41 +0200 Subject: python binding functional --- perf/python/local_lat.py | 6 +++--- perf/python/remote_lat.py | 4 ++-- perf/python/remote_thr.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'perf/python') diff --git a/perf/python/local_lat.py b/perf/python/local_lat.py index 7f1503f..e9d46e0 100644 --- a/perf/python/local_lat.py +++ b/perf/python/local_lat.py @@ -23,13 +23,13 @@ import libpyzmq def main (): if len (sys.argv) != 4: - print 'usage: local_lat ' + print 'usage: local_lat ' sys.exit (1) try: bind_to = sys.argv [1] - roundtrip_count = int (sys.argv [2]) - message_size = int (sys.argv [3]) + message_size = int (sys.argv [2]) + roundtrip_count = int (sys.argv [3]) except (ValueError, OverflowError), e: print 'message-size and roundtrip-count must be integers' sys.exit (1) diff --git a/perf/python/remote_lat.py b/perf/python/remote_lat.py index 372f567..f2ee04a 100644 --- a/perf/python/remote_lat.py +++ b/perf/python/remote_lat.py @@ -23,7 +23,7 @@ import libpyzmq def main (): if len(sys.argv) != 4: - print 'usage: remote_lat ' + print 'usage: remote_lat ' sys.exit (1) try: @@ -49,7 +49,7 @@ def main (): end = datetime.now () delta = (end - start).microseconds + 1000000 * (end - start).seconds - latency = delta / roundtrip_count / 2 + latency = float (delta) / roundtrip_count / 2 print "message size: %.0f [B]" % (message_size, ) print "roundtrip count: %.0f" % (roundtrip_count, ) diff --git a/perf/python/remote_thr.py b/perf/python/remote_thr.py index a80adfd..bab001d 100644 --- a/perf/python/remote_thr.py +++ b/perf/python/remote_thr.py @@ -27,7 +27,7 @@ def main (): sys.exit (1) try: - connect_to = argv [1] + connect_to = sys.argv [1] message_size = int (sys.argv [2]) message_count = int (sys.argv [3]) except (ValueError, OverflowError), e: -- cgit v1.2.3 From 63b56d7fb38624c32111f9188d54b6fefb10a0e5 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 4 Sep 2009 16:21:39 +0200 Subject: python perf tests are included into distribution package --- perf/python/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 perf/python/Makefile.am (limited to 'perf/python') diff --git a/perf/python/Makefile.am b/perf/python/Makefile.am new file mode 100644 index 0000000..cda8477 --- /dev/null +++ b/perf/python/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = \ + local_lat.py \ + remote_lat.py \ + local_thr.py \ + remote_thr.py -- cgit v1.2.3