Skip to content

Commit

Permalink
Support for more test comparisons (including message and fetch size).
Browse files Browse the repository at this point in the history
  • Loading branch information
cburroughs committed Mar 28, 2011
1 parent dd0eb57 commit ed0fdad
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 2 deletions.
12 changes: 12 additions & 0 deletions perf/src/java/kafka/perf/KafkaPerfSimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public String getXaxisLabel()

if(NUM_TOPIC.equals(xaxisLabel))
return "Number of Topics";

if(MSG_SIZE.equals(xaxisLabel))
return "Message Size";

if(FETCH_SIZE.equals(xaxisLabel))
return "Fetch Size";

return "";
}
Expand All @@ -261,6 +267,12 @@ public String getXAxisVal()

if(NUM_TOPIC.equals(xaxisLabel))
return ""+numTopic;

if(MSG_SIZE.equals(xaxisLabel))
return ""+messageSize;

if(FETCH_SIZE.equals(xaxisLabel))
return ""+fetchSize;

return "";
}
Expand Down
2 changes: 1 addition & 1 deletion perf/util-bin/remote-kafka-env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

REMOTE_KAFKA_HOME="~/kafka-perf"
REMOTE_KAFKA_LOG_DIR="~/tmp/kafka-logs"
REMOTE_KAFKA_LOG_DIR="$REMOTE_KAFKA_HOME/tmp/kafka-logs"
#SIMULATOR_HOST
SIMULATOR_SCRIPT="$REMOTE_KAFKA_HOME/perf/run-simulator.sh"

Expand Down
15 changes: 15 additions & 0 deletions perf/util-bin/run-fetchsize-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

. `dirname $0`/remote-kafka-env.sh

REMOTE_KAFKA_HOST=$1 # todo: use this instead of localhost for -kafkaServer=localhost (@ problem)
REMOTE_SIM_HOST=$2
TEST_TIME=$3
REPORT_FILE=$4

for i in 1 `seq -s " " 10 10 50` ;
do
kafka_startup
ssh $REMOTE_SIM_HOST "$SIMULATOR_SCRIPT -kafkaServer=localhost -numTopic=10 -reportFile=$REPORT_FILE -time=$TEST_TIME -numConsumer=20 -numProducer=40 -xaxis=fetchSize -msgSize=1000 -fetchSize=$((1024*$i))"
kafka_cleanup
done
15 changes: 15 additions & 0 deletions perf/util-bin/run-msgsize-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

. `dirname $0`/remote-kafka-env.sh

REMOTE_KAFKA_HOST=$1 # todo: use this instead of localhost for -kafkaServer=localhost (@ problem)
REMOTE_SIM_HOST=$2
TEST_TIME=$3
REPORT_FILE=$4

for i in 1 200 `seq -s " " 1000 1000 10000` ;
do
kafka_startup
ssh $REMOTE_SIM_HOST "$SIMULATOR_SCRIPT -kafkaServer=localhost -numTopic=10 -reportFile=$REPORT_FILE -time=$TEST_TIME -numConsumer=20 -numProducer=40 -xaxis=msgSize -msgSize=$i"
kafka_cleanup
done
15 changes: 15 additions & 0 deletions perf/util-bin/run-numconsumer-sustained.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -x

. `dirname $0`/remote-kafka-env.sh

REMOTE_KAFKA_HOST=$1 # todo: use this instead of localhost for -kafkaServer=localhost (@ problem)
REMOTE_SIM_HOST=$2
TEST_TIME=$3
REPORT_FILE=$4

for i in 1 `seq -s " " 10 10 50` ;
do
kafka_startup
ssh $REMOTE_SIM_HOST "$SIMULATOR_SCRIPT -kafkaServer=localhost -numTopic=10 -reportFile=$REPORT_FILE -time=$TEST_TIME -numConsumer=$i -numProducer=10 -xaxis=numConsumer"
kafka_cleanup
done
2 changes: 1 addition & 1 deletion perf/util-bin/run-numtopic-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ REPORT_FILE=$4
for i in 1 `seq -s " " 10 10 50` ;
do
kafka_startup
ssh $REMOTE_SIM_HOST "$SIMULATOR_SCRIPT -kafkaServer=localhost -numTopic=$i -reportFile=$REPORT_FILE -time=$TEST_TIME -numConsumer=2 -numProducer=4 -xaxis=numTopic"
ssh $REMOTE_SIM_HOST "$SIMULATOR_SCRIPT -kafkaServer=localhost -numTopic=$i -reportFile=$REPORT_FILE -time=$TEST_TIME -numConsumer=20 -numProducer=40 -xaxis=numTopic"
kafka_cleanup
done

0 comments on commit ed0fdad

Please sign in to comment.