X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fbenchmarks-utils.cjs;fp=benchmarks%2Fbenchmarks-utils.cjs;h=f212c7b2eaa31e74629a42d86120bdbbf4e1e1a4;hb=3a5027122ca6401ae1d755843b20f714c61e3240;hp=c3b470f7a152724e6729b1dc29ccb1bb58fa3761;hpb=937d524da3a5cce4795b85ddd1c430f0d184f731;p=poolifier.git diff --git a/benchmarks/benchmarks-utils.cjs b/benchmarks/benchmarks-utils.cjs index c3b470f7..f212c7b2 100644 --- a/benchmarks/benchmarks-utils.cjs +++ b/benchmarks/benchmarks-utils.cjs @@ -4,14 +4,14 @@ const { mkdirSync, readFileSync, rmSync, - writeFileSync + writeFileSync, } = require('node:fs') const { TaskFunctions } = require('./benchmarks-types.cjs') const jsonIntegerSerialization = n => { for (let i = 0; i < n; i++) { const o = { - a: i + a: i, } JSON.stringify(o) } @@ -19,8 +19,8 @@ const jsonIntegerSerialization = n => { } /** - * @param {number} n - The number of fibonacci numbers to generate. - * @returns {number} - The nth fibonacci number. + * @param n - The number of fibonacci numbers to generate. + * @returns - The nth fibonacci number. */ const fibonacci = n => { n = BigInt(n) @@ -36,8 +36,8 @@ const fibonacci = n => { } /** - * @param {number} n - The number to calculate the factorial of. - * @returns {number} - The factorial of n. + * @param n - The number to calculate the factorial of. + * @returns - The factorial of n. */ const factorial = n => { if (n === 0 || n === 1) { @@ -65,7 +65,7 @@ const readWriteFiles = ( const filePath = `${baseDirectory}/${i}` writeFileSync(filePath, i.toString(), { encoding: 'utf8', - flag: 'a' + flag: 'a', }) readFileSync(filePath, 'utf8') } @@ -89,5 +89,5 @@ const executeTaskFunction = data => { } module.exports = { - executeTaskFunction + executeTaskFunction, }