repositories
/
poolifier.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
New bench execution and sleep between a test and another
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
functions
/
function-to-bench.js
1
module
.
exports
=
function
(
data
) {
2
if
(
data
.
taskType
===
'CPU_INTENSIVE'
) {
3
// CPU Intensive task
4
for
(
let
i
=
0
;
i
<=
5000
;
i
++) {
5
const
o
= {
6
a
:
i
7
}
8
JSON
.
stringify
(
o
)
9
}
10
return
{
ok
:
1
}
11
}
else
{
12
throw new
Error
(
'Please specify the task type'
)
13
}
14
}