perf: export also JSON results with external pools benchmark
[poolifier.git] / benchmarks / versus-external-pools / fixed-nanothreads.mjs
index 4f589e2c9c184e920e03b7061b388c5640439304..d18f71b51d82e6c92a56c017a989c2487016864c 100644 (file)
@@ -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)