X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fbenchmarks-utils.mjs;h=d2f4fc23e344966f3acddd5fcb5048469fee418f;hb=25f5b5de1c522d29f7a16597245a2f7c9434b124;hp=9435b0d3acbf464337165292cdb6395691240241;hpb=024daf59a8f93e67b7a307d1b5690ba564c80bab;p=poolifier.git diff --git a/benchmarks/benchmarks-utils.mjs b/benchmarks/benchmarks-utils.mjs index 9435b0d3..d2f4fc23 100644 --- a/benchmarks/benchmarks-utils.mjs +++ b/benchmarks/benchmarks-utils.mjs @@ -55,7 +55,7 @@ function jsonIntegerSerialization (n) { * @param {number} n - The number of fibonacci numbers to generate. * @returns {number} - The nth fibonacci number. */ -export function fibonacci (n) { +function fibonacci (n) { if (n <= 1) return n return fibonacci(n - 1) + fibonacci(n - 2) } @@ -65,14 +65,14 @@ export function fibonacci (n) { * @param {number} n - The number to calculate the factorial of. * @returns {number} - The factorial of n. */ -export function factorial (n) { +function factorial (n) { if (n === 0) { return 1 } return factorial(n - 1) * n } -export function readWriteFiles ( +function readWriteFiles ( n, baseDirectory = `/tmp/poolifier-benchmarks/${crypto.randomInt( 281474976710655