repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump @types/node from 18.6.3 to 18.6.4 (#502)
[poolifier.git]
/
benchmarks
/
internal
/
benchmark-utils.js
diff --git
a/benchmarks/internal/benchmark-utils.js
b/benchmarks/internal/benchmark-utils.js
index 878c2cae4b34bcd77e8c24cc96c96b109c290c43..a915a044211fa7c8c14f98c369e82c30739c1733 100644
(file)
--- a/
benchmarks/internal/benchmark-utils.js
+++ b/
benchmarks/internal/benchmark-utils.js
@@
-17,10
+17,12
@@
async function runPoolifierTest (pool, { tasks, workerData }) {
}
function generateRandomInteger (max, min = 0) {
}
function generateRandomInteger (max, min = 0) {
+ max = Math.floor(max)
if (min) {
if (min) {
- return Math.floor(Math.random() * (max - min + 1) + min)
+ min = Math.ceil(min)
+ return Math.floor(Math.random() * (max - min + 1)) + min
}
}
- return Math.floor(Math.random() *
max + 1
)
+ return Math.floor(Math.random() *
(max + 1)
)
}
const LIST_FORMATTER = new Intl.ListFormat('en-US', {
}
const LIST_FORMATTER = new Intl.ListFormat('en-US', {