repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a script to sync sonar properties
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
static-suchmokuo-node-worker-threads-pool.js
diff --git
a/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js
b/benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js
index df7edd81519e0500305b0de60885ab43bc13dd8d..ded55b882a8e66cd9bfbf0c8367e2b8de6e6eb7a 100644
(file)
--- a/
benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js
+++ b/
benchmarks/versus-external-pools/static-suchmokuo-node-worker-threads-pool.js
@@
-1,17
+1,18
@@
// IMPORT LIBRARIES
// IMPORT LIBRARIES
-const {
DynamicPool,
StaticPool } = require('node-worker-threads-pool')
+const { StaticPool } = require('node-worker-threads-pool')
// FINISH IMPORT LIBRARIES
// IMPORT FUNCTION TO BENCH
// FINISH IMPORT LIBRARIES
// IMPORT FUNCTION TO BENCH
-const functionToBench = require('./functions/
json-stringify
')
+const functionToBench = require('./functions/
function-to-bench
')
// FINISH IMPORT FUNCTION TO BENCH
// FINISH IMPORT FUNCTION TO BENCH
-const size =
process.env.POOL_SIZE
-const iterations =
process.env.NUM_ITERATIONS
+const size =
Number(process.env.POOL_SIZE)
+const iterations =
Number(process.env.NUM_ITERATIONS)
const data = {
const data = {
- test: 'MYBENCH'
+ test: 'MYBENCH',
+ taskType: process.env['TASK_TYPE']
}
const pool = new StaticPool({
}
const pool = new StaticPool({
- size:
Number(size)
,
+ size:
size
,
task: functionToBench
})
task: functionToBench
})