This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from hasithajayasundara/master
Added 40KB message size test case
- Loading branch information
Showing
5 changed files
with
1,786 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
JmeterHome=<jmeter_home> | ||
ThreadCount=10 | ||
MessageSize=40KB | ||
NumberOfMessages=1000000 | ||
Throughput=5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
JmeterHome = <jmeter_home> | ||
ThreadCount = <number_of_threads> | ||
MessageSize = <size_of_the_message> | ||
NumberOfMessages = <number_of_messages_need_to_be_published> | ||
Throughput= <throughput_need_to_be_maintained> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
|
||
# WSO2 Inc. licenses this file to you under the Apache License, | ||
# Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
#!/usr/bin/env bash | ||
|
||
destination="" | ||
is_given_destination=false | ||
|
||
# get inputs from the user -d topic/queue | ||
while getopts "hp:d:t:h:v" OPTION | ||
do | ||
case $OPTION in | ||
d) | ||
case $OPTARG in | ||
queue) | ||
is_given_destination=true | ||
destination="queue" | ||
;; | ||
topic) | ||
is_given_destination=true | ||
destination="topic" | ||
;; | ||
?) | ||
echo $OPTARG | ||
echo "$OPTARG is an invalid destination.JMS destination should be a queue or a topic" | ||
exit | ||
;; | ||
esac | ||
break | ||
;; | ||
h) | ||
help_text="Welcome to ballerina message broker micro-benchmark tool\n\nUsage:\n\t./run_40KB_test_scenario.sh [command].\n\nCommands\n\t-h ask for help\n\t-d set jms destination type queue/topic\n" | ||
printf "$help_text" | ||
exit | ||
;; | ||
?) | ||
printf "Invalid command.Run ./run_broker_test_scenario.sh -h for usage.\n" | ||
exit | ||
;; | ||
esac | ||
done | ||
|
||
|
||
if [ $is_given_destination == false ]; | ||
then | ||
printf 'A JMS destination should be provided.\nRun ./run_40KB_test_scenario.sh -h for usage.\n' | ||
exit | ||
fi | ||
|
||
time=$(date '+%d-%m-%Y-%H-%M-%S') | ||
broker_consumer_log=broker_consumer_"$time".log | ||
broker_publisher_log=broker_publisher_"$time".log | ||
|
||
# create log folder if not exist | ||
if [ ! -e logs ]; | ||
then | ||
mkdir -p logs | ||
fi | ||
|
||
# execute publisher and consumer at the same time | ||
echo "Starting message consumer." | ||
printf $(run_broker_consumer.sh -t "resources/40KB_test_plan.properties" -s "40KB_test_scenario/$time" -d "queue" &) >> logs/"$broker_consumer_log" | ||
sleep 4 | ||
echo "Starting message pubisher" | ||
printf $(run_broker_publisher.sh -t "resources/40KB_test_plan.properties" -s "40KB_test_scenario/$time" -d "queue" & >> logs/"$broker_publisher_log") | ||
wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.