Apply dependencies update (#482)
[poolifier.git] / benchmarks / versus-external-pools / bench.sh
CommitLineData
bd0e5c4d
JB
1#!/usr/bin/env bash
2
9f7e7a99 3### The -t argument is needed to specify the type of task that you want to benchmark.
4### Supported values are CPU_INTENSIVE
be0676b3 5
9f7e7a99 6taskType='CPU_INTENSIVE'
7while getopts t: flag
8do
bd0e5c4d
JB
9 case "${flag}" in
10 t)
11 taskType=${OPTARG}
12 ;;
13 esac
9f7e7a99 14done
be0676b3 15
9f7e7a99 16echo 'Running bench for task type:' $taskType
17export TASK_TYPE=$taskType
18# Execute bench
19export NODE_ENV=production
be0676b3
APA
20export POOL_SIZE=10
21export NUM_ITERATIONS=100000
bd0e5c4d
JB
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