3 ### The -t argument permit to specify the type of task that you want to benchmark.
4 ### The -s argument permit to specify the size of task that you want to benchmark.
5 ### Supported values are CPU_INTENSIVE, IO_INTENSIVE
7 taskType
='CPU_INTENSIVE'
9 while getopts "t:s:h" option
19 echo "Usage: $0 [-t taskType] [-s taskSize]"
25 echo 'Running benchmarks for task type:' ${taskType} 'and task size:' ${taskSize}
26 export TASK_TYPE
=${taskType}
27 export TASK_SIZE
=${taskSize}
29 export NODE_ENV
=production
31 export NUM_ITERATIONS
=100000
34 caffeinate .
/hyperfine_benchmarks.sh
37 systemd-inhibit .
/hyperfine_benchmarks.sh
40 echo "Unsupported $OSTYPE"