Commit | Line | Data |
---|---|---|
9f7e7a99 | 1 | ### The -t argument is needed to specify the type of task that you want to benchmark. |
2 | ### Supported values are CPU_INTENSIVE | |
be0676b3 | 3 | |
9f7e7a99 | 4 | taskType='CPU_INTENSIVE' |
5 | while getopts t: flag | |
6 | do | |
7 | case "${flag}" in | |
8 | t) taskType=${OPTARG};; | |
9 | esac | |
10 | done | |
be0676b3 | 11 | |
9f7e7a99 | 12 | echo 'Running bench for task type:' $taskType |
13 | export TASK_TYPE=$taskType | |
14 | # Execute bench | |
15 | export NODE_ENV=production | |
be0676b3 APA |
16 | export POOL_SIZE=10 |
17 | export NUM_ITERATIONS=100000 | |
74750c7f | 18 | hyperfine --export-markdown BENCH-100000.md --min-runs 10 \ |
3be5ac00 | 19 | --prepare 'sleep 15' \ |
20 | 'node dynamic-piscina.js' \ | |
21 | 'node fixed-piscina.js' \ | |
be0676b3 | 22 | 'node dynamic-poolifier.js' \ |
9f7e7a99 | 23 | 'node fixed-poolifier.js' \ |
75876e4c | 24 | 'node dynamic-suchmokuo-node-worker-threads-pool.js' \ |
144f78e0 JB |
25 | 'node static-suchmokuo-node-worker-threads-pool.js' \ |
26 | 'node threadjs.js' \ | |
27 | 'node dynamic-workerpool.js' \ | |
28 | 'node fixed-workerpool.js' |