Update device configuration

- Move general config files out of example directory to fairmq/run.
 - Use FairMQProgOptions for MQ example 5.
 - Add SendPartAsync() for non-blocking send of a message part.
This commit is contained in:
Alexey Rybalchenko
2015-11-11 11:06:11 +01:00
parent 837490cc38
commit 383a220333
7 changed files with 75 additions and 4 deletions

40
fairmq/run/benchmark.json Normal file
View File

@@ -0,0 +1,40 @@
{
"fairMQOptions":
{
"device":
{
"id": "bsampler1",
"channel":
{
"name": "data-out",
"socket":
{
"type": "push",
"method": "bind",
"address": "tcp://*:5555",
"sndBufSize": "1000",
"rcvBufSize": "1000",
"rateLogging": "1"
}
}
},
"device":
{
"id": "sink1",
"channel":
{
"name": "data-in",
"socket":
{
"type": "pull",
"method": "connect",
"address": "tcp://localhost:5555",
"sndBufSize": "1000",
"rcvBufSize": "1000",
"rateLogging": "1"
}
}
}
}
}

18
fairmq/run/startBenchmark.sh.in Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
if(@NANOMSG_FOUND@); then
buffSize="500000000" # nanomsg buffer size is in bytes
else
buffSize="10000" # zeromq high-water mark is in messages
fi
SAMPLER="bsampler"
SAMPLER+=" --id bsampler1"
SAMPLER+=" --event-size 10000"
SAMPLER+=" --config-json-file @CMAKE_BINARY_DIR@/bin/config/benchmark.json"
xterm -geometry 80x23+0+0 -hold -e @CMAKE_BINARY_DIR@/bin/$SAMPLER &
SINK="sink"
SINK+=" --id sink1"
SINK+=" --config-json-file @CMAKE_BINARY_DIR@/bin/config/benchmark.json"
xterm -geometry 80x23+500+0 -hold -e @CMAKE_BINARY_DIR@/bin/$SINK &