Instantly share code, notes, and snippets.

Embed
What would you like to do?
MapR Streams Throughput Parameterized By Message Size
# DESCRIPTION: Perf test streams with a producer sending 1 million messages with
# record sizes between 10, 100, 500, 1000, 2000, 5000, 10000 to 1 topic with 1
# partition.
maprcli stream delete -path /user/mapr/iantest
maprcli stream create -path /user/mapr/iantest -produceperm p -consumeperm p -topicperm p -compression off
THREADCOUNT=1
TOPICS=1
PARTITIONS=1
MESSAGES=1000000
# print csv header
mapr perfproducer -path /user/mapr/iantest | tail -n 12 | grep ":" | awk -F ":" '{printf "%s,",$1}' > here.dat
echo "threadCount,topicCount,partitions,messages,messageSize" >> here.dat
#run parameterized test
for MSGSIZE in 10 100 500 1000 2000 5000 10000; do
echo "Running 20 iterations for message size = $MSGSIZE"
for i in `seq 1 20`; do
maprcli stream delete -path /user/mapr/iantest
maprcli stream create -path /user/mapr/iantest -produceperm p -consumeperm p -topicperm p -compression off
echo -n "" >> here.dat
sleep 2
mapr perfproducer -path /user/mapr/iantest -ntopics $TOPICS -npart $PARTITIONS -nmsgs $MESSAGES -msgsz $MSGSIZE | tail -n 12 | grep ":" | awk '{printf "%s,",$NF}' >> here.dat
echo "$THREADCOUNT,$TOPICS,$PARTITIONS,$MESSAGES,$MSGSIZE" >> here.dat
echo -n "."
done
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment