X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=benchmarks%2Fversus-external-pools%2Fbench.sh;h=34ebb788c0cd90341e9264cc1cb83b19f3c7568f;hb=7a6a0a967f5d0978d7ad0714616194fe7592f69a;hp=f78500f773032e33411ffdf820d1e3e582cc902c;hpb=900850b7d0c7eeeaeff9b72ce3be909d4a2e6fe5;p=poolifier.git diff --git a/benchmarks/versus-external-pools/bench.sh b/benchmarks/versus-external-pools/bench.sh index f78500f7..34ebb788 100755 --- a/benchmarks/versus-external-pools/bench.sh +++ b/benchmarks/versus-external-pools/bench.sh @@ -1,20 +1,30 @@ #!/usr/bin/env bash -### The -t argument is needed to specify the type of task that you want to benchmark. -### Supported values are CPU_INTENSIVE +### The -t argument permit to specify the type of task that you want to benchmark. +### The -s argument permit to specify the size of task that you want to benchmark. +### Supported values are CPU_INTENSIVE, IO_INTENSIVE taskType='CPU_INTENSIVE' -while getopts t: flag +taskSize=5000 +while getopts "t:s:h" option do - case "${flag}" in + case "${option}" in t) taskType=${OPTARG} ;; + s) + taskSize=${OPTARG} + ;; + *|h) + echo "Usage: $0 [-t taskType] [-s taskSize]" + exit 1 + ;; esac done -echo 'Running bench for task type:' $taskType -export TASK_TYPE=$taskType +echo 'Running benchmarks for task type:' ${taskType} 'and task size:' ${taskSize} +export TASK_TYPE=${taskType} +export TASK_SIZE=${taskSize} # Execute bench export NODE_ENV=production export POOL_SIZE=10