bench.sh: ensure default values are set
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 7 Dec 2022 14:31:09 +0000 (15:31 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 7 Dec 2022 14:31:09 +0000 (15:31 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
benchmarks/versus-external-pools/bench.sh

index 7a1bb6c0e261fe4095f2dad1b229ac4742ca9e2e..377a1a5bbda8fbcaea9e133d71924283964e241e 100755 (executable)
@@ -9,8 +9,6 @@ usage() {
     exit 1
 }
 
-taskType='CPU_INTENSIVE'
-taskSize=5000
 while getopts "t:s:h" option
 do
   case "${option}" in
@@ -35,6 +33,9 @@ do
   esac
 done
 
+taskType=${taskType:-'CPU_INTENSIVE'}
+taskSize=${taskSize:-5000}
+
 echo 'Running benchmarks for task type:' ${taskType} 'and task size:' ${taskSize}
 export TASK_TYPE=${taskType}
 export TASK_SIZE=${taskSize}