This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git


The following commit(s) were added to refs/heads/main by this push:
     new 355fa63  Added Multiburst script too
355fa63 is described below

commit 355fa63ac4bab5f2d20fc8d9e84202d48afa712f
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Sep 20 13:20:54 2021 +0200

    Added Multiburst script too
---
 profiling/kafka-minio/script/burst.sh                    | 2 +-
 profiling/kafka-minio/script/{burst.sh => multiburst.sh} | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/profiling/kafka-minio/script/burst.sh 
b/profiling/kafka-minio/script/burst.sh
index 5adaaa4..f02d174 100755
--- a/profiling/kafka-minio/script/burst.sh
+++ b/profiling/kafka-minio/script/burst.sh
@@ -40,5 +40,5 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
 
 for i in $(seq 1 $NUMBER)
 do
-   echo $PAYLOAD | $KAFKACAT_PATH -b $BROKER -t $TOPIC -H "file=$(cat 
/dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1)"
+   echo $PAYLOAD | $KAFKACAT_PATH -b $BROKER -t $TOPIC -H "file=$(cat 
/dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1)" 
 done
diff --git a/profiling/kafka-minio/script/burst.sh 
b/profiling/kafka-minio/script/multiburst.sh
similarity index 79%
copy from profiling/kafka-minio/script/burst.sh
copy to profiling/kafka-minio/script/multiburst.sh
index 5adaaa4..0179833 100755
--- a/profiling/kafka-minio/script/burst.sh
+++ b/profiling/kafka-minio/script/multiburst.sh
@@ -25,6 +25,11 @@ while [[ $# -gt 0 ]]; do
       shift # past argument
       shift # past value
       ;;
+    -s|--script)
+      SCRIPTS="$2"
+      shift # past argument
+      shift # past value
+      ;;
     --default)
       DEFAULT=YES
       shift # past argument
@@ -38,7 +43,7 @@ done
 
 set -- "${POSITIONAL[@]}" # restore positional parameters
 
-for i in $(seq 1 $NUMBER)
+for i in $(seq 1 $SCRIPTS)
 do
-   echo $PAYLOAD | $KAFKACAT_PATH -b $BROKER -t $TOPIC -H "file=$(cat 
/dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1)"
+   sh ./burst.sh -b $BROKER -t $TOPIC -n $NUMBER -p $PAYLOAD &
 done

Reply via email to