-
Notifications
You must be signed in to change notification settings - Fork 1
/
bench.sh
executable file
·51 lines (44 loc) · 1.63 KB
/
bench.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
cd react-app
hyperfine \
--warmup 1 \
--runs 3 \
--export-json cold.json \
--prepare 'rm -Rf node_modules .yarn $(pnpm store path) ~/.bun/ package-lock.json pnpm-lock.yaml yarn.lock bun.lockb zap.lock; yarn cache clean --all; npm cache clean --force; zap store clear; true' \
'npm i --ignore-scripts --no-audit' \
'env YARN_ENABLE_SCRIPTS=false YARN_NODE_LINKER=node-modules yarn' \
'pnpm i --ignore-scripts' \
'bun i --ignore-scripts' \
'zap i --ignore-scripts'
hyperfine \
--warmup 1 \
--runs 3 \
--export-json only-cache.json \
--prepare 'rm -Rf node_modules package-lock.json pnpm-lock.yaml yarn.lock bun.lockb zap.lock; true' \
'npm i --ignore-scripts --no-audit' \
'env YARN_ENABLE_SCRIPTS=false YARN_NODE_LINKER=node-modules yarn' \
'pnpm i --ignore-scripts' \
'bun i --ignore-scripts' \
'zap i --ignore-scripts'
hyperfine \
--warmup 1 \
--runs 3 \
--export-json without-lockfile.json \
--prepare 'rm -f package-lock.json pnpm-lock.yaml yarn.lock bun.lockb zap.lock; true' \
'npm i --ignore-scripts --no-audit' \
'env YARN_ENABLE_SCRIPTS=false YARN_NODE_LINKER=node-modules yarn' \
'pnpm i --ignore-scripts' \
'bun i --ignore-scripts' \
'zap i --ignore-scripts'
hyperfine \
--warmup 1 \
--runs 3 \
--export-json without-node-modules.json \
--prepare 'rm -Rf node_modules; true' \
'npm i --ignore-scripts --no-audit' \
'env YARN_ENABLE_SCRIPTS=false YARN_NODE_LINKER=node-modules yarn' \
'pnpm i --ignore-scripts' \
'bun i --ignore-scripts' \
'zap i --ignore-scripts'
rm -Rf node_modules .yarn package-lock.json pnpm-lock.yaml yarn.lock bun.lockb zap.lock
cd -