summaryrefslogtreecommitdiff
path: root/benchmark/bench/_util.js
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2024-12-03 17:03:24 +0000
committerGravatar GitHub <noreply@github.com> 2024-12-03 17:03:24 +0000
commit9b5f3a702d0bdec79c0b33f904d0d3c1a40566f1 (patch)
tree213501435eadcaa17d299a0b1feed0faf6b00639 /benchmark/bench/_util.js
parent30722870da52a19cb3106ac25c8215e5c44bbee3 (diff)
downloadastro-9b5f3a702d0bdec79c0b33f904d0d3c1a40566f1.tar.gz
astro-9b5f3a702d0bdec79c0b33f904d0d3c1a40566f1.tar.zst
astro-9b5f3a702d0bdec79c0b33f904d0d3c1a40566f1.zip
refactor: use `vitest` for benchmarks (#12605)
* refactor: use `vitest` for benchmarks * increase timeout * increase timeout * Restore correct label
Diffstat (limited to 'benchmark/bench/_util.js')
-rw-r--r--benchmark/bench/_util.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/benchmark/bench/_util.js b/benchmark/bench/_util.js
index b16a16e1c..d9dfe5b19 100644
--- a/benchmark/bench/_util.js
+++ b/benchmark/bench/_util.js
@@ -19,3 +19,14 @@ export function calculateStat(numbers) {
const max = Math.max(...numbers);
return { avg, stdev, max };
}
+
+export async function makeProject(name) {
+ console.log('Making project:', name);
+ const projectDir = new URL(`../projects/${name}/`, import.meta.url);
+
+ const makeProjectMod = await import(`../make-project/${name}.js`);
+ await makeProjectMod.run(projectDir);
+
+ console.log('Finished making project:', name);
+ return projectDir;
+}