X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffixed-nanothreads.mjs;h=d5572059d6dff3ec23ad3394df3691c48707c723;hb=0a80186676a91b336bef90ba44d937bd85717576;hp=4f589e2c9c184e920e03b7061b388c5640439304;hpb=76e2e9784b6912c2bf33f19768ecc2121168110d;p=poolifier.git diff --git a/benchmarks/versus-external-pools/fixed-nanothreads.mjs b/benchmarks/versus-external-pools/fixed-nanothreads.mjs index 4f589e2c..d5572059 100644 --- a/benchmarks/versus-external-pools/fixed-nanothreads.mjs +++ b/benchmarks/versus-external-pools/fixed-nanothreads.mjs @@ -1,9 +1,7 @@ -// IMPORT LIBRARIES import { ThreadPool } from 'nanothreads' -// FINISH IMPORT LIBRARIES -// IMPORT FUNCTION TO BENCH +import { executeAsyncFn } from '../benchmarks-utils.mjs' import functionToBench from './functions/function-to-bench.js' -// FINISH IMPORT FUNCTION TO BENCH + const size = parseInt(process.env.POOL_SIZE) const iterations = parseInt(process.env.NUM_ITERATIONS) const data = { @@ -27,4 +25,4 @@ async function run () { process.exit() } -await run() +await executeAsyncFn(run)