FairMQ/fairmq/run/startBenchmark.sh.in
Alexey Rybalchenko e1fef82657 FairMQ: Extend Multipart and messaging API
- Extend the multipart API to allow sending vectors of messages or helper
   thin wrapper FairMQParts. See example in examples/MQ/8-multipart.
 - NewMessage() can be used in devices instead of
   fTransportFactory->CreateMessage().
   Possible arguments remain unchanged (no args, size or data+size).
 - Send()/Receive() methods can be used in devices instead of
   fChannels.at("chan").at(i).Send()/Receive():
   Send(msg, "chan", i = 0), Receive(msg, "chan", i = 0).
 - Use the new methods in MQ examples and tests.
 - No breaking changes, but FAIRMQ_INTERFACE_VERSION is incremented to 3
   to allow to check for new methods.
2016-02-29 16:25:39 +01:00

41 lines
1005 B
Bash
Executable File

#!/bin/bash
numMsgs="0"
msgSize="1000000"
if [[ $1 =~ ^[0-9]+$ ]]; then
msgSize=$1
fi
echo "Starting benchmark with message size of $msgSize bytes."
if [[ $2 =~ ^[0-9]+$ ]]; then
numMsgs=$2
fi
if [ $numMsgs = 0 ]; then
echo "Unlimited number of messages."
else
echo "Number of messages: $numMsgs."
fi
echo ""
echo "Usage: startBenchmark [message size=1000000] [number of messages=0]"
SAMPLER="bsampler"
SAMPLER+=" --id bsampler1"
#SAMPLER+=" --io-threads 2"
#SAMPLER+=" --transport nanomsg"
SAMPLER+=" --msg-size $msgSize"
SAMPLER+=" --num-msgs $numMsgs"
SAMPLER+=" --config-json-file @CMAKE_BINARY_DIR@/bin/config/benchmark.json"
xterm -geometry 80x23+0+0 -hold -e taskset 0x1 @CMAKE_BINARY_DIR@/bin/$SAMPLER &
SINK="sink"
SINK+=" --id sink1"
#SINK+=" --io-threads 2"
#SINK+=" --transport nanomsg"
SINK+=" --num-msgs $numMsgs"
SINK+=" --config-json-file @CMAKE_BINARY_DIR@/bin/config/benchmark.json"
xterm -geometry 80x23+500+0 -hold -e taskset 0x2 @CMAKE_BINARY_DIR@/bin/$SINK &