summaryrefslogtreecommitdiff
path: root/benchmark/bench/_util.js
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2023-08-25 21:00:51 +0800
committerGravatar GitHub <noreply@github.com> 2023-08-25 21:00:51 +0800
commit0ae3b7a7ba1bd999608f10666dd454a91b811f9e (patch)
treefeefc02c439dcc7794dcc2c199777e9a1af3ae38 /benchmark/bench/_util.js
parentacf652fc1d5db166231e87e22d0d50444f5556d8 (diff)
downloadastro-0ae3b7a7ba1bd999608f10666dd454a91b811f9e.tar.gz
astro-0ae3b7a7ba1bd999608f10666dd454a91b811f9e.tar.zst
astro-0ae3b7a7ba1bd999608f10666dd454a91b811f9e.zip
Improve stress test benchmark (#8225)
Diffstat (limited to 'benchmark/bench/_util.js')
-rw-r--r--benchmark/bench/_util.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/benchmark/bench/_util.js b/benchmark/bench/_util.js
index c9108695c..23c472604 100644
--- a/benchmark/bench/_util.js
+++ b/benchmark/bench/_util.js
@@ -1,6 +1,9 @@
-import { createRequire } from 'module';
+import { createRequire } from 'node:module';
+import path from 'node:path';
-export const astroBin = createRequire(import.meta.url).resolve('astro');
+const astroPkgPath = createRequire(import.meta.url).resolve('astro/package.json');
+
+export const astroBin = path.resolve(astroPkgPath, '../astro.js');
/** @typedef {{ avg: number, stdev: number, max: number }} Stat */