X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Ffixed-nanothreads.mjs;h=d18f71b51d82e6c92a56c017a989c2487016864c;hb=9d698f93d3cb8c2567f9a92aa29ab35d035725b4;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..d18f71b5 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 './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)