summaryrefslogtreecommitdiff
path: root/perf/ruby
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/ruby
parent9c522dccaf0b2c8074bd96fbfb4c968f45748ba4 (diff)
added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests
Diffstat (limited to 'perf/ruby')
-rw-r--r--perf/ruby/local_thr.rb7
-rw-r--r--perf/ruby/remote_thr.rb6
2 files changed, 11 insertions, 2 deletions
diff --git a/perf/ruby/local_thr.rb b/perf/ruby/local_thr.rb
index 117e54b..db14cf2 100644
--- a/perf/ruby/local_thr.rb
+++ b/perf/ruby/local_thr.rb
@@ -28,7 +28,12 @@ message_size = ARGV[1].to_i
message_count = ARGV[2].to_i
ctx = Context.new(1, 1)
-s = Socket.new(ctx, P2P);
+s = Socket.new(ctx, SUB);
+s.setsockopt (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(0)
diff --git a/perf/ruby/remote_thr.rb b/perf/ruby/remote_thr.rb
index 8d98848..ef93961 100644
--- a/perf/ruby/remote_thr.rb
+++ b/perf/ruby/remote_thr.rb
@@ -28,7 +28,11 @@ message_size = ARGV[1].to_i
message_count = ARGV[2].to_i
ctx = Context.new(1, 1)
-s = Socket.new(ctx, P2P);
+s = Socket.new(ctx, PUB);
+
+# Add your socket options here.
+# For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
+
s.connect(connect_to);
msg = "#{'0'*message_size}"