X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffunctions%2Ffunction-to-bench.js;h=6a05cb629ad7bdcc816d393215bb6ae5d80a48d5;hb=25f5b5de1c522d29f7a16597245a2f7c9434b124;hp=3009054ee68658486b737f90ca060bd207a2f2b3;hpb=670734fc5562e286ce17b7f3075d115832e1436a;p=poolifier.git diff --git a/benchmarks/versus-external-pools/functions/function-to-bench.js b/benchmarks/versus-external-pools/functions/function-to-bench.js index 3009054e..6a05cb62 100644 --- a/benchmarks/versus-external-pools/functions/function-to-bench.js +++ b/benchmarks/versus-external-pools/functions/function-to-bench.js @@ -1,11 +1,11 @@ +'use strict' /** * The worker function to execute during pools benchmarks. * NOTE: This function requires to be self-contained, thread-safe and re-entrant. - * * @param {*} data The worker data. * @returns {*} The result. */ -function functionToBench (data) { +module.exports = function functionToBench (data) { const crypto = require('crypto') const fs = require('fs') const TaskTypes = { @@ -48,5 +48,3 @@ function functionToBench (data) { throw new Error(`Unknown task type: ${data.taskType}`) } } - -module.exports = functionToBench