repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update dependencies. (#318)
[poolifier.git]
/
benchmarks
/
internal
/
benchmark-utils.js
diff --git
a/benchmarks/internal/benchmark-utils.js
b/benchmarks/internal/benchmark-utils.js
index cbf69307cdad7e5b07f5b8998099700ffafba2f7..878c2cae4b34bcd77e8c24cc96c96b109c290c43 100644
(file)
--- a/
benchmarks/internal/benchmark-utils.js
+++ b/
benchmarks/internal/benchmark-utils.js
@@
-1,7
+1,7
@@
async function runPoolifierTest (pool, { tasks, workerData }) {
return new Promise((resolve, reject) => {
let executions = 0
async function runPoolifierTest (pool, { tasks, workerData }) {
return new Promise((resolve, reject) => {
let executions = 0
- for (let i =
0
; i <= tasks; i++) {
+ for (let i =
1
; i <= tasks; i++) {
pool
.execute(workerData)
.then(res => {
pool
.execute(workerData)
.then(res => {
@@
-23,4
+23,9
@@
function generateRandomInteger (max, min = 0) {
return Math.floor(Math.random() * max + 1)
}
return Math.floor(Math.random() * max + 1)
}
-module.exports = { runPoolifierTest, generateRandomInteger }
+const LIST_FORMATTER = new Intl.ListFormat('en-US', {
+ style: 'long',
+ type: 'conjunction'
+})
+
+module.exports = { generateRandomInteger, LIST_FORMATTER, runPoolifierTest }