summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authormalosek <malosek@fastmq.com>2009-09-11 11:13:15 +0200
committermalosek <malosek@fastmq.com>2009-09-11 11:13:15 +0200
commit88695aaee607e6f4db1f4fd052e2596653fb18b2 (patch)
tree21b9439d327239053bfcd3c080e1ffa92a5855db /perf
parentf824b8a067c60b32260c56020742d6428ed3bb98 (diff)
link libzmq with glib when congifured --with-pgm
Diffstat (limited to 'perf')
-rw-r--r--perf/cpp/remote_thr.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/perf/cpp/remote_thr.cpp b/perf/cpp/remote_thr.cpp
index 15a4ed1..71a7b53 100644
--- a/perf/cpp/remote_thr.cpp
+++ b/perf/cpp/remote_thr.cpp
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <assert.h>
#include <stddef.h>
+#include <stdint.h>
int main (int argc, char *argv [])
{
@@ -34,9 +35,19 @@ int main (int argc, char *argv [])
size_t message_size = (size_t) atoi (argv [2]);
int message_count = atoi (argv [3]);
+ // appl threads, io threads
zmq::context_t ctx (1, 1);
- zmq::socket_t s (ctx, ZMQ_P2P);
+ zmq::socket_t s (ctx, ZMQ_PUB);
+
+ // 10Mb/s
+ uint32_t rate = 10000;
+ s.setsockopt (ZMQ_RATE, &rate, sizeof (rate));
+
+ // 10s
+ uint32_t recovery_ivl = 10;
+ s.setsockopt (ZMQ_RECOVERY_IVL, &recovery_ivl, sizeof (recovery_ivl));
+
s.connect (connect_to);
for (int i = 0; i != message_count; i++) {