X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fdeployments%2Fadvanced%2Fburst.sh;h=7b912cf80fa555cd0e9b9ff5fc6de77d784c7c33;hp=b05b6e076f8ae9e0aefe8fb119281cc8b4e877e8;hb=c881c12ed7e116f1d43760a0d9873f860c10a357;hpb=af14877201a9856708ec43086a229777d9cb3da7 diff --git a/example/diameter/launcher/deployments/advanced/burst.sh b/example/diameter/launcher/deployments/advanced/burst.sh index b05b6e0..7b912cf 100755 --- a/example/diameter/launcher/deployments/advanced/burst.sh +++ b/example/diameter/launcher/deployments/advanced/burst.sh @@ -1,7 +1,4 @@ #!/bin/bash -> curl_log.txt -TRACE="--trace-ascii curl_log.txt" -SERVER=`cat .httpServer` burstMargin__dflt=1 salir () { @@ -51,7 +48,7 @@ uso () { echo echo " resume:" echo " Resume an stopped burst launch from the same point (start will reset" - echo " the work pointer to the first burst list position). This is equivalent" + echo " the work pointer to the first burst list position). This is equivalent" echo " to one-message-push operation." echo echo " repeat [[yes] | no]:" @@ -77,18 +74,14 @@ uso () { echo " Show programmed burst message for order provided." echo echo - salir -} - -_curl () { - curl -m 5 --data "$1" $TRACE ${SERVER} + salir } echo echo [[ "$1" = "" ]] && uso case $1 in - clear) _curl "burst|clear" + clear) ./operation.sh "burst|clear" ;; load) [[ "$3" = "" ]] && uso [[ ! -f "${3}.sh" ]] && salir "Burst generation file '${3}.sh' not found!" @@ -97,43 +90,43 @@ case $1 in then count=$2 RESTO=$((count%4)) - [[ "$RESTO" != "0" ]] && salir "Data context should load a multiple of 4 (messages generated by data.sh)" + [[ "$RESTO" != "0" ]] && salir "Data context should load a multiple of 4 (messages generated by data.sh)" fi count=1 while test "$count" -le "$2" do ${3}.sh $count > .${3}.xml echo -n "Loading message ${count}; " - _curl "burst|load|.${3}.xml" + ./operation.sh "burst|load|.${3}.xml" count=$((count+1)) done ;; start) load=$burstMargin__dflt [[ "$2" != "" ]] && load=$2 entero $load - _curl "burst|start|$load" + ./operation.sh "burst|start|$load" ;; pop) release=$burstMargin__dflt [[ "$2" != "" ]] && release=$2 entero $release - _curl "burst|pop|$release" + ./operation.sh "burst|pop|$release" ;; push) [[ "$2" = "" ]] && uso entero $2 - _curl "burst|push|$2" + ./operation.sh "burst|push|$2" ;; - stop) _curl "burst|stop" + stop) ./operation.sh "burst|stop" ;; - resume) _curl "burst|push|1" + resume) ./operation.sh "burst|push|1" ;; repeat) repeat=yes [[ "$2" != "" ]] && repeat=$2 - _curl "burst|repeat|$repeat" + ./operation.sh "burst|repeat|$repeat" ;; send) amount=1 [[ "$2" != "" ]] && amount=$2 entero $amount - _curl "burst|send|$amount" + ./operation.sh "burst|send|$amount" ;; sendXS) [[ "$2" = "" ]] && uso limit=$3 @@ -157,13 +150,13 @@ case $1 in TPS=$READ_TPS [[ "$TPS" = "0" ]] && salir "Test stopped due to 0-tps value read" # Background: - _curl "burst|send|$amount" & + ./operation.sh "burst|send|$amount" & count=$((count+amount)) AFTER_ns=`date +%s%N` # Real tps: REAL_TPS=$(calc "1000000000 * $count / ($AFTER_ns - $BEGIN_ns)") echo $REAL_TPS > .real_tps - + COEF=1 [[ $(calc "$TPS > $REAL_TPS") = "1" ]] && COEF=$(calc "$REAL_TPS / $TPS") K=$(calc "$COEF ^ 10") @@ -173,11 +166,11 @@ case $1 in ;; goto) [[ "$2" = "" ]] && uso entero $2 - _curl "burst|goto|$2" + ./operation.sh "burst|goto|$2" ;; look) [[ "$2" = "" ]] && uso entero $2 - _curl "burst|look|$2" + ./operation.sh "burst|look|$2" ;; *) uso esac