Fix eslint configuration
[poolifier.git] / benchmarks / versus-external-pools / bench.sh
... / ...
CommitLineData
1#!/usr/bin/env bash
2
3### The -t argument is needed to specify the type of task that you want to benchmark.
4### Supported values are CPU_INTENSIVE
5
6taskType='CPU_INTENSIVE'
7while getopts t: flag
8do
9 case "${flag}" in
10 t)
11 taskType=${OPTARG}
12 ;;
13 esac
14done
15
16echo 'Running bench for task type:' $taskType
17export TASK_TYPE=$taskType
18# Execute bench
19export NODE_ENV=production
20export POOL_SIZE=10
21export NUM_ITERATIONS=100000
22case "$OSTYPE" in
23 darwin*)
24 caffeinate ./hyperfine_benchmarks.sh
25 ;;
26 linux*)
27 systemd-inhibit ./hyperfine_benchmarks.sh
28 ;;
29 *)
30 echo "Unsupported $OSTYPE"
31 ;;
32esac