new scripts for CPS and check status
[anna.git] / example / diameter / launcher / deployments / st-client / launchCPS.sh
diff --git a/example/diameter/launcher/deployments/st-client/launchCPS.sh b/example/diameter/launcher/deployments/st-client/launchCPS.sh
new file mode 100755 (executable)
index 0000000..08bf495
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#############
+# VARIABLES #
+#############
+ADML_INSTANCES=`cat .st_conf_adml_instances 2>/dev/null`
+
+#############
+# FUNCTIONS #
+#############
+_exit() {
+  echo
+  echo $1
+  echo
+  exit 1
+}
+
+#############
+# EXECUTION #
+#############
+echo
+echo
+cd `dirname $0`
+./checkStatus.sh
+[ $? -ne 0 ] && _exit "Fix status to continue ..."
+echo
+echo "Input desired rate (test cases per second) to start testing [0: stop if active]:"
+read desired_rate
+if [ "$desired_rate" != "" ]
+then
+  rate_per_instance=$((desired_rate/$ADML_INSTANCES))
+fi
+echo "This configures $rate_per_instance test cases per second and instance"
+echo " (there are $ADML_INSTANCES instances available)".
+echo
+echo "Press ENTER to continue, CTRL-C to abort ..."
+read dummy
+
+./operation.sh "test|ttps|$rate_per_instance"
+