summaryrefslogtreecommitdiff
path: root/perf/python
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-09-16 12:22:36 +0200
committermalosek <malosek@fastmq.com>2009-09-16 12:22:36 +0200
commit7a5db6041f4f11ed502fa7446da900509dedb00f (patch)
tree6f96beb5f647a3ac296be2f24a2f675880f6b8a7 /perf/python
parent9c522dccaf0b2c8074bd96fbfb4c968f45748ba4 (diff)
added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests
Diffstat (limited to 'perf/python')
-rw-r--r--perf/python/local_thr.py8
-rw-r--r--perf/python/remote_thr.py6
2 files changed, 12 insertions, 2 deletions
diff --git a/perf/python/local_thr.py b/perf/python/local_thr.py
index 0d142cf..26896d0 100644
--- a/perf/python/local_thr.py
+++ b/perf/python/local_thr.py
@@ -35,7 +35,13 @@ def main ():
sys.exit (1)
ctx = libpyzmq.Context (1, 1);
- s = libpyzmq.Socket (ctx, libpyzmq.P2P)
+ s = libpyzmq.Socket (ctx, libpyzmq.SUB)
+
+ s.setsockopt (libpyzmq.SUBSCRIBE , "*");
+
+ # Add your socket options here.
+ # For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
s.bind (bind_to)
msg = s.recv ()
diff --git a/perf/python/remote_thr.py b/perf/python/remote_thr.py
index bab001d..f7c69cf 100644
--- a/perf/python/remote_thr.py
+++ b/perf/python/remote_thr.py
@@ -35,7 +35,11 @@ def main ():
sys.exit (1)
ctx = libpyzmq.Context (1, 1);
- s = libpyzmq.Socket (ctx, libpyzmq.P2P)
+ s = libpyzmq.Socket (ctx, libpyzmq.PUB)
+
+ # Add your socket options here.
+ # For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
s.connect (connect_to)
msg = ''.join ([' ' for n in range (0, message_size)])