fix: add missing file for external benchmark
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 18 Sep 2023 10:52:55 +0000 (12:52 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 18 Sep 2023 10:52:55 +0000 (12:52 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
benchmarks/versus-external-pools/utils.mjs [new file with mode: 0644]

diff --git a/benchmarks/versus-external-pools/utils.mjs b/benchmarks/versus-external-pools/utils.mjs
new file mode 100644 (file)
index 0000000..3d26ea1
--- /dev/null
@@ -0,0 +1,9 @@
+export const executeAsyncFn = async fn => {
+  try {
+    await fn()
+  } catch (e) {
+    console.error(e)
+    // eslint-disable-next-line n/no-process-exit
+    process.exit(1)
+  }
+}