X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fbenchmarks-utils.cjs;h=4dd1227b00b2362b393b47113e70a154aad6fe87;hb=f2b53f5792e9013e7f11e1ac535bea9f3727fedd;hp=e94910984831770041715c33b301f6a68c4ec862;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/benchmarks/benchmarks-utils.cjs b/benchmarks/benchmarks-utils.cjs index e9491098..4dd1227b 100644 --- a/benchmarks/benchmarks-utils.cjs +++ b/benchmarks/benchmarks-utils.cjs @@ -186,18 +186,6 @@ const LIST_FORMATTER = new Intl.ListFormat('en-US', { type: 'conjunction' }) -const generateRandomInteger = (max = Number.MAX_SAFE_INTEGER, min = 0) => { - if (max < min || max < 0 || min < 0) { - throw new RangeError('Invalid interval') - } - max = Math.floor(max) - if (min != null && min !== 0) { - min = Math.ceil(min) - return Math.floor(Math.random() * (max - min + 1)) + min - } - return Math.floor(Math.random() * (max + 1)) -} - const jsonIntegerSerialization = n => { for (let i = 0; i < n; i++) { const o = { @@ -268,6 +256,5 @@ const executeTaskFunction = data => { module.exports = { LIST_FORMATTER, executeTaskFunction, - generateRandomInteger, runPoolifierPoolBenchmark }